changeset 34599:80246b016caf

Add code to free the URL list items.
author ib
date Sat, 11 Feb 2012 20:42:20 +0000
parents 877e37095c2d
children 19398061c204
files gui/util/list.c gui/util/list.h
diffstat 2 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/gui/util/list.c	Sat Feb 11 17:21:14 2012 +0000
+++ b/gui/util/list.c	Sat Feb 11 20:42:20 2012 +0000
@@ -187,6 +187,13 @@
             urlList = url_item;
         }
         return NULL;
+
+    case gtkDelURL:
+        while (urlList) {
+            free(urlList->url);
+            urlList = urlList->next;
+        }
+        return NULL;
     }
 
     return NULL;
--- a/gui/util/list.h	Sat Feb 11 17:21:14 2012 +0000
+++ b/gui/util/list.h	Sat Feb 11 20:42:20 2012 +0000
@@ -24,6 +24,7 @@
 #define gtkGetPrevPlItem 7
 #define gtkGetCurrPlItem 8
 #define gtkDelPl         9
+#define gtkDelURL        10
 #define gtkDelCurrPlItem 23
 #define gtkInsertPlItem  24
 #define gtkSetCurrPlItem 25