changeset 33783:a450fade6a83

Fix memory leaks in the Win32 GUI. This closes Bugzilla #1312.
author ib
date Mon, 11 Jul 2011 11:10:06 +0000
parents 896b427e598e
children 72adb79f5a16
files gui/win32/skinload.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/gui/win32/skinload.c	Mon Jul 11 10:39:55 2011 +0000
+++ b/gui/win32/skinload.c	Mon Jul 11 11:10:06 2011 +0000
@@ -513,6 +513,9 @@
         if(!(fp = fopen(filename,"rb")))
         {
             mp_msg(MSGT_GPLAYER, MSGL_ERR, "[FONT LOAD] Font not found \"%s\"\n", skin->fonts[x]->name);
+            free(tmp);
+            free(desc);
+            free(filename);
             return;
         }
         while(!feof(fp))
@@ -603,6 +606,9 @@
     {
         mp_msg(MSGT_GPLAYER, MSGL_FATAL, "[SKIN LOAD] Skin \"%s\" not found\n", skindir);
         skin->freeskin(skin);
+        free(tmp);
+        free(desc);
+        free(filename);
         return NULL;
     }