diff options
author | Matthias Clasen <matthiasc@src.gnome.org> | 2008-11-14 23:26:08 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2008-11-14 23:26:08 +0000 |
commit | 3308fda56cbc4e8a048b9a8f99c96a661835f5ec (patch) | |
tree | 79a3dcbbada8e1a47f14c144ec712440ae3fb309 /gio | |
parent | c2dc7dd85ed6ff551be9ebff2f14ff8f1afbb443 (diff) |
Plug a memory leak
svn path=/branches/glib-2-18/; revision=7653
Diffstat (limited to 'gio')
-rw-r--r-- | gio/ChangeLog | 9 | ||||
-rw-r--r-- | gio/fam/fam-helper.c | 10 |
2 files changed, 14 insertions, 5 deletions
diff --git a/gio/ChangeLog b/gio/ChangeLog index 2926db3ae..33a0ccbad 100644 --- a/gio/ChangeLog +++ b/gio/ChangeLog @@ -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() diff --git a/gio/fam/fam-helper.c b/gio/fam/fam-helper.c index 2dafa80ce..5cd12aa7a 100644 --- a/gio/fam/fam-helper.c +++ b/gio/fam/fam-helper.c @@ -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 |