Fix file descriptor leak in BLI_file_ungzip_to_mem and small memleak in wm_window_title.
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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 {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user