From 2a8865ad0d7c4976f43d99ed258c84ae4f95b0ce Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Wed, 26 Apr 2017 14:47:25 +0200 Subject: Fix use-after-free when deleting station Eventcmd uses both, selStation and selSong. Fixes #617. --- src/ui_act.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ui_act.c b/src/ui_act.c index e1dbfc0..ee43809 100644 --- a/src/ui_act.c +++ b/src/ui_act.c @@ -240,11 +240,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"); } -- cgit v1.2.3