glib r7653 - in branches/glib-2-18/gio: . fam



Author: matthiasc
Date: Fri Nov 14 23:26:08 2008
New Revision: 7653
URL: http://svn.gnome.org/viewvc/glib?rev=7653&view=rev

Log:
Plug a memory leak


Modified:
   branches/glib-2-18/gio/ChangeLog
   branches/glib-2-18/gio/fam/fam-helper.c

Modified: branches/glib-2-18/gio/fam/fam-helper.c
==============================================================================
--- branches/glib-2-18/gio/fam/fam-helper.c	(original)
+++ branches/glib-2-18/gio/fam/fam-helper.c	Fri Nov 14 23:26:08 2008
@@ -208,11 +208,6 @@
   if (!_fam_sub_startup ())
     return NULL;
   
-  sub = g_new0 (fam_sub, 1);
-  sub->pathname = g_strdup (pathname);
-  sub->directory = directory;
-  sub->user_data = user_data;
-  
   G_LOCK (fam_connection);
   /* We need to queue up incoming messages to avoid blocking on write
    *  if there are many monitors being canceled */
@@ -223,6 +218,11 @@
     return NULL;
   }
   
+  sub = g_new0 (fam_sub, 1);
+  sub->pathname = g_strdup (pathname);
+  sub->directory = directory;
+  sub->user_data = user_data;
+  
   if (directory)
     FAMMonitorDirectory (fam_connection, pathname, &sub->request, sub);
   else



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