[gnome-logs/wip/jonathankang/fix-mem-leak: 2/3] decrese the reference count of GDateTime when needed
- From: Jonathan Kang <jonathankang src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-logs/wip/jonathankang/fix-mem-leak: 2/3] decrese the reference count of GDateTime when needed
- Date: Tue, 20 Mar 2018 07:32:31 +0000 (UTC)
commit f73ad1c6512b14f0a0ba6e67f9939e0b1b814f37
Author: Jonathan Kang <jonathankang gnome org>
Date: Mon Mar 19 15:28:27 2018 +0800
decrese the reference count of GDateTime when needed
Call g_date_time_unref() on the return value of get_start_date_time()
and get_end_date_time() to decrese the reference count by one and
avoid memory leak.
src/gl-searchpopover.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/gl-searchpopover.c b/src/gl-searchpopover.c
index e1e6319..62d8a79 100644
--- a/src/gl-searchpopover.c
+++ b/src/gl-searchpopover.c
@@ -1003,6 +1003,7 @@ start_time_spinbox_value_changed (GtkSpinButton *spin_button,
g_object_notify_by_pspec (G_OBJECT (popover),
obj_properties[PROP_JOURNAL_TIMESTAMP_RANGE]);
+ g_date_time_unref (start_date_time);
g_free (button_label);
}
@@ -1244,6 +1245,7 @@ end_time_spinbox_value_changed (GtkSpinButton *spin_button,
g_object_notify_by_pspec (G_OBJECT (popover),
obj_properties[PROP_JOURNAL_TIMESTAMP_RANGE]);
+ g_date_time_unref (end_date_time);
g_free (button_label);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]