[gnome-calendar] search-view: fix memory leak



commit 372c6fba3d984248650fd58cab2e0e878d424625
Author: Erick Pérez Castellanos <erick red gmail com>
Date:   Thu Jan 8 22:42:23 2015 -0500

    search-view: fix memory leak
    
    Use internal icaltimetype from ECalComponentDateTime. Mark
    GcalSearchView::event-activated signal parameter as constant.

 src/gcal-search-view.c |    5 +----
 src/gcal-search-view.h |    2 +-
 2 files changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/src/gcal-search-view.c b/src/gcal-search-view.c
index 733afa6..2cf124b 100644
--- a/src/gcal-search-view.c
+++ b/src/gcal-search-view.c
@@ -191,16 +191,13 @@ open_event (GtkListBox    *list,
   GcalSearchViewPrivate *priv;
   GcalEventData *data;
   ECalComponentDateTime dt;
-  icaltimetype *time;
-
 
   priv = gcal_search_view_get_instance_private (GCAL_SEARCH_VIEW (user_data));
   data = g_hash_table_lookup (priv->row_to_event, row);
 
   e_cal_component_get_dtstart (data->event_component, &dt);
-  time = gcal_dup_icaltime (dt.value);
 
-  g_signal_emit_by_name (user_data, "event-activated", time);
+  g_signal_emit_by_name (user_data, "event-activated", dt.value);
 
   e_cal_component_free_datetime (&dt);
 }
diff --git a/src/gcal-search-view.h b/src/gcal-search-view.h
index 030b82c..6cdfc7f 100644
--- a/src/gcal-search-view.h
+++ b/src/gcal-search-view.h
@@ -47,7 +47,7 @@ struct _GcalSearchViewClass
   GtkPopoverClass parent_class;
 
   /* signals */
-  void       (*event_activated)   (GcalSearchView *view, icaltimetype *date);
+  void       (*event_activated)   (GcalSearchView *view, const icaltimetype *date);
 };
 
 GType          gcal_search_view_get_type         (void);


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