changeset 36155:29c690aefc6f

Fix resource leak.
author ib
date Wed, 08 May 2013 12:39:56 +0000
parents 319cbb4d0967
children 056cd00eba14
files gui/util/list.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/gui/util/list.c	Wed May 08 12:37:28 2013 +0000
+++ b/gui/util/list.c	Wed May 08 12:39:56 2013 +0000
@@ -367,8 +367,10 @@
 
     item = calloc(1, sizeof(plItem));
 
-    if (!item)
+    if (!item) {
+        free(path);
         return False;
+    }
 
     mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[list] adding %s/%s\n", path, file);