summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Kang <jonathankang@gnome.org>2018-03-19 15:13:42 +0800
committerJonathan Kang <jonathankang@gnome.org>2018-04-21 11:42:38 +0800
commit4ee47bd34988d8174e71ca51564b5add5aa2be37 (patch)
tree6ac155b4e8cfb2e00764baccd907b1e201f45db1
parentd5748e35ae0e2f5f090d907b29cf5344e4fd508d (diff)
downloadgnome-logs-4ee47bd34988d8174e71ca51564b5add5aa2be37.tar.gz
free strings to avoid memory leak
Some strings are not freed when needed. Free them to avoid memory leak. (cherry picked from commit 363803d9bdf551d4b74c8bc15f375bdd83c44364)
-rw-r--r--src/gl-searchpopover.c4
-rw-r--r--src/gl-window.c5
2 files changed, 7 insertions, 2 deletions
diff --git a/src/gl-searchpopover.c b/src/gl-searchpopover.c
index 0822f7f..e1e6319 100644
--- a/src/gl-searchpopover.c
+++ b/src/gl-searchpopover.c
@@ -1002,6 +1002,8 @@ start_time_spinbox_value_changed (GtkSpinButton *spin_button,
g_object_notify_by_pspec (G_OBJECT (popover),
obj_properties[PROP_JOURNAL_TIMESTAMP_RANGE]);
+
+ g_free (button_label);
}
static void
@@ -1241,6 +1243,8 @@ end_time_spinbox_value_changed (GtkSpinButton *spin_button,
g_object_notify_by_pspec (G_OBJECT (popover),
obj_properties[PROP_JOURNAL_TIMESTAMP_RANGE]);
+
+ g_free (button_label);
}
static void
diff --git a/src/gl-window.c b/src/gl-window.c
index 65b67e8..a06f1d4 100644
--- a/src/gl-window.c
+++ b/src/gl-window.c
@@ -195,9 +195,9 @@ on_view_boot (GSimpleAction *action,
GlEventToolbar *toolbar;
GArray *boot_ids;
GlJournalBootID *boot_id;
- gchar *current_boot;
const gchar *boot_match;
- const gchar *latest_boot;
+ gchar *current_boot;
+ gchar *latest_boot;
priv = gl_window_get_instance_private (GL_WINDOW (user_data));
event_list = GL_EVENT_VIEW_LIST (priv->event_list);
@@ -224,6 +224,7 @@ on_view_boot (GSimpleAction *action,
g_simple_action_set_state (action, variant);
g_free (current_boot);
+ g_free (latest_boot);
}
static void