Fix file descriptor leak in BLI_file_ungzip_to_mem and small memleak in wm_window_title.

This commit is contained in:
2012-10-07 15:39:47 +00:00
parent e3ab85a3f5
commit c80c4c896a
2 changed files with 4 additions and 4 deletions

View File

@@ -140,6 +140,8 @@ char *BLI_file_ungzip_to_mem(const char *from_file, int *size_r)
}
else break;
}
gzclose(gzfile);
if (size == 0) {
MEM_freeN(mem);

View File

@@ -300,11 +300,9 @@ void wm_window_close(bContext *C, wmWindowManager *wm, wmWindow *win)
void wm_window_title(wmWindowManager *wm, wmWindow *win)
{
/* handle the 'temp' window, only set title when not set before */
if (win->screen && win->screen->temp) {
char *title = GHOST_GetTitle(win->ghostwin);
if (title == NULL || title[0] == 0)
GHOST_SetTitle(win->ghostwin, "Blender");
/* nothing to do for 'temp' windows,
* because WM_window_open_temp always sets window title */
}
else {