fix use of freed mem

This commit is contained in:
notaz 2013-10-12 02:43:47 +03:00
parent 2d6460655c
commit 9993e0d6dd

View file

@ -183,7 +183,6 @@ int load_cd_image(const char *cd_img_name, int *type)
elprintf(EL_STATUS, "Track %2i: %s %9i AUDIO %s", elprintf(EL_STATUS, "Track %2i: %s %9i AUDIO %s",
n, tmp_ext, length, cue_data->tracks[n].fname); n, tmp_ext, length, cue_data->tracks[n].fname);
} }
cue_destroy(cue_data);
goto finish; goto finish;
} }
@ -260,6 +259,9 @@ finish:
if (PicoCDLoadProgressCB != NULL) if (PicoCDLoadProgressCB != NULL)
PicoCDLoadProgressCB(cd_img_name, 100); PicoCDLoadProgressCB(cd_img_name, 100);
if (cue_data != NULL)
cue_destroy(cue_data);
return 0; return 0;
} }