[gnome-calendar] gcal-event: fix several memory leaks



commit 00b89b89cd5987bc857d6756902a6fa1e41f5104
Author: Mohammed Sadiq <sadiq sadiqpk org>
Date:   Tue May 23 09:15:26 2017 +0530

    gcal-event: fix several memory leaks
    
    https://bugzilla.gnome.org/show_bug.cgi?id=782972

 src/gcal-event.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/gcal-event.c b/src/gcal-event.c
index b0fe2e8..11cccde 100644
--- a/src/gcal-event.c
+++ b/src/gcal-event.c
@@ -916,7 +916,9 @@ gcal_event_set_date_end (GcalEvent *self,
 
       g_object_notify (G_OBJECT (self), "date-end");
 
-      g_clear_pointer (&component_dt, e_cal_component_free_datetime);
+      e_cal_component_free_datetime (&current);
+      e_cal_component_free_datetime (component_dt);
+      g_free (component_dt);
     }
 }
 
@@ -971,7 +973,9 @@ gcal_event_set_date_start (GcalEvent *self,
 
       g_object_notify (G_OBJECT (self), "date-start");
 
-      g_clear_pointer (&component_dt, e_cal_component_free_datetime);
+      e_cal_component_free_datetime (&current);
+      e_cal_component_free_datetime (component_dt);
+      g_free (component_dt);
     }
 }
 


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