Memory leaks and uninitialised value in catalogue_ui

This commit is contained in:
jacksonmj 2011-08-19 22:00:48 +08:00 committed by Simon Robertshaw
parent 075bf06c71
commit 7ae7d5fd56

View File

@ -5470,7 +5470,7 @@ void catalogue_ui(pixel * vid_buf)
int listy = 0, listxc; int listy = 0, listxc;
int listx = 0, listyc; int listx = 0, listyc;
pixel * vid_buf2; pixel * vid_buf2;
float scrollvel, offsetf = 0.0f; float scrollvel = 0.0f, offsetf = 0.0f;
char savetext[128] = ""; char savetext[128] = "";
char * last = mystrdup(""); char * last = mystrdup("");
savelist_e *saves, *cssave, *csave; savelist_e *saves, *cssave, *csave;
@ -5687,6 +5687,8 @@ openfin:
if(saves) if(saves)
free_saveslist(saves); free_saveslist(saves);
free(last);
free(vid_buf2);
return; return;
} }