[gnome-photos/wip/favorites: 4/7] change-monitor: Do not leak the event when merging



commit 9d591e6ef6e4e2b05df94e7214e95ec5e6fd21f8
Author: Debarshi Ray <debarshir gnome org>
Date:   Wed Dec 12 00:32:58 2012 +0530

    change-monitor: Do not leak the event when merging

 src/photos-tracker-change-monitor.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/photos-tracker-change-monitor.c b/src/photos-tracker-change-monitor.c
index 06dfad9..1b9240b 100644
--- a/src/photos-tracker-change-monitor.c
+++ b/src/photos-tracker-change-monitor.c
@@ -121,7 +121,10 @@ photos_tracker_change_monitor_add_event (PhotosTrackerChangeMonitor *self,
   old_event = (PhotosTrackerChangeEvent *) g_hash_table_lookup (priv->pending, subject);
 
   if (old_event != NULL)
-    photos_tracker_change_event_merge (old_event, event);
+    {
+      photos_tracker_change_event_merge (old_event, event);
+      photos_tracker_change_event_free (event);
+    }
   else
     g_hash_table_insert (priv->pending, (gpointer) g_strdup (subject), (gpointer) event);
 }



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