glib r7468 - in branches/glib-2-16/gio: . xdgmime



Author: matthiasc
Date: Thu Sep 11 19:19:40 2008
New Revision: 7468
URL: http://svn.gnome.org/viewvc/glib?rev=7468&view=rev

Log:
        Bug 551149 â xdgmime mem leak

        * xdgmime/xdgmime.c (xdg_mime_init_from_directory): Plug
        a memory leak. Patch by Christian Persch



Modified:
   branches/glib-2-16/gio/ChangeLog
   branches/glib-2-16/gio/xdgmime/xdgmime.c

Modified: branches/glib-2-16/gio/xdgmime/xdgmime.c
==============================================================================
--- branches/glib-2-16/gio/xdgmime/xdgmime.c	(original)
+++ branches/glib-2-16/gio/xdgmime/xdgmime.c	Thu Sep 11 19:19:40 2008
@@ -101,8 +101,11 @@
 
   for (list = dir_time_list; list; list = list->next) 
     {
-      if (strcmp (list->directory_name, file_name) == 0) 
-        return;
+      if (strcmp (list->directory_name, file_name) == 0)
+        {
+          free (file_name);
+          return;
+        }
     }
   
   list = calloc (1, sizeof (XdgDirTimeList));



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]