From 9993e0d6dd65e7065e81cab76791c7c607cda0b2 Mon Sep 17 00:00:00 2001 From: notaz Date: Sat, 12 Oct 2013 02:43:47 +0300 Subject: [PATCH] fix use of freed mem --- pico/cd/cd_image.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pico/cd/cd_image.c b/pico/cd/cd_image.c index 97c8f3f0..07b55ceb 100644 --- a/pico/cd/cd_image.c +++ b/pico/cd/cd_image.c @@ -183,7 +183,6 @@ int load_cd_image(const char *cd_img_name, int *type) elprintf(EL_STATUS, "Track %2i: %s %9i AUDIO %s", n, tmp_ext, length, cue_data->tracks[n].fname); } - cue_destroy(cue_data); goto finish; } @@ -260,6 +259,9 @@ finish: if (PicoCDLoadProgressCB != NULL) PicoCDLoadProgressCB(cd_img_name, 100); + if (cue_data != NULL) + cue_destroy(cue_data); + return 0; } -- 2.39.5