Plug a memory leak

svn path=/branches/glib-2-18/; revision=7653
This commit is contained in:
Matthias Clasen
2008-11-14 23:26:08 +00:00
parent c2dc7dd85e
commit 3308fda56c
2 changed files with 14 additions and 5 deletions

View File

@@ -1,3 +1,12 @@
2008-11-14 Matthias Clasen <mclasen@redhat.com>
Merged from trunk.
Bug 556910 [fam-helper.c:223]: Memory leak: sub
* fam/fam-helper.c: Fix a memory leak.
Reported by Daniel Marjamäki
2008-11-12 Tor Lillqvist <tml@novell.com>
Bug 556415 - Crash on Windows 2000 in g_winhttp_vfs_init()

View File

@@ -208,11 +208,6 @@ _fam_sub_add (const gchar* pathname,
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 @@ _fam_sub_add (const gchar* pathname,
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