Skip to content

Commit

Permalink
Fix use-after-free when deleting station
Browse files Browse the repository at this point in the history
Eventcmd uses both, selStation and selSong. Fixes PromyLOPh#617.
  • Loading branch information
PromyLOPh authored and thedmd committed May 17, 2017
1 parent 21b1675 commit b732d8c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/ui_act.c
Expand Up @@ -228,11 +228,13 @@ BarUiActCallback(BarUiActDeleteStation) {
/* drain playlist */
PianoDestroyPlaylist (PianoListNextP (app->playlist));
app->playlist->head.next = NULL;
selSong = NULL;
}
app->nextStation = NULL;
/* XXX: usually we shoudn’t touch cur*, but DELETE_STATION destroys
* station struct */
app->curStation = NULL;
selStation = NULL;
}
BarUiActDefaultEventcmd ("stationdelete");
}
Expand Down

0 comments on commit b732d8c

Please sign in to comment.