[gnome-keyring] egg-cleanup: Don't leak 'cleanup' on unregister
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-keyring] egg-cleanup: Don't leak 'cleanup' on unregister
- Date: Tue, 14 Oct 2014 16:19:00 +0000 (UTC)
commit 8ea8329cc09e263d9628e791e0f5a464bde63413
Author: Christophe Fergeau <cfergeau redhat com>
Date: Wed Sep 17 11:49:16 2014 +0200
egg-cleanup: Don't leak 'cleanup' on unregister
When unregistering a cleanup instance, the memory allocated for the cleanup
was not freed causing a memory leak.
https://bugzilla.gnome.org/show_bug.cgi?id=738508
egg/egg-cleanup.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/egg/egg-cleanup.c b/egg/egg-cleanup.c
index 3d06ef6..3dec665 100644
--- a/egg/egg-cleanup.c
+++ b/egg/egg-cleanup.c
@@ -52,6 +52,7 @@ egg_cleanup_unregister (GDestroyNotify notify, gpointer user_data)
cleanup = (EggCleanup*)l->data;
if (cleanup->notify == notify && cleanup->user_data == user_data) {
registered_cleanups = g_slist_remove (registered_cleanups, cleanup);
+ g_free (cleanup);
break;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]