diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2017-04-26 14:47:25 +0200 |
---|---|---|
committer | Michał Cichoń <michcic@gmail.com> | 2017-05-17 04:37:39 +0200 |
commit | b732d8c429ff77f825cb5de93e139672effd2619 (patch) | |
tree | 10ad7c35a7c34b5bac86ef1d882340c98a1cdfa2 /src | |
parent | 21b167532b07f631b107968837dcfdf93025239b (diff) | |
download | pianobar-windows-b732d8c429ff77f825cb5de93e139672effd2619.tar.gz pianobar-windows-b732d8c429ff77f825cb5de93e139672effd2619.tar.bz2 pianobar-windows-b732d8c429ff77f825cb5de93e139672effd2619.zip |
Fix use-after-free when deleting station
Eventcmd uses both, selStation and selSong. Fixes #617.
Diffstat (limited to 'src')
-rw-r--r-- | src/ui_act.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ui_act.c b/src/ui_act.c index cb1d7a8..a036f19 100644 --- a/src/ui_act.c +++ b/src/ui_act.c @@ -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"); } |