[gnome-software] Fix double free on destruction of GsShellSearch
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Fix double free on destruction of GsShellSearch
- Date: Wed, 2 Mar 2016 22:35:23 +0000 (UTC)
commit b5e5ffa6d95fab55704bf6d6ad56582d9687d959
Author: Robert Ancell <robert ancell canonical com>
Date: Thu Mar 3 11:35:05 2016 +1300
Fix double free on destruction of GsShellSearch
src/gs-shell-search.c | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
---
diff --git a/src/gs-shell-search.c b/src/gs-shell-search.c
index f259d0c..ee8b5e2 100644
--- a/src/gs-shell-search.c
+++ b/src/gs-shell-search.c
@@ -409,10 +409,21 @@ gs_shell_search_dispose (GObject *object)
g_clear_object (&self->cancellable);
g_clear_object (&self->search_cancellable);
+ G_OBJECT_CLASS (gs_shell_search_parent_class)->dispose (object);
+}
+
+/**
+ * gs_shell_search_finalize:
+ **/
+static void
+gs_shell_search_finalize (GObject *object)
+{
+ GsShellSearch *self = GS_SHELL_SEARCH (object);
+
g_free (self->appid_to_show);
g_free (self->value);
- G_OBJECT_CLASS (gs_shell_search_parent_class)->dispose (object);
+ G_OBJECT_CLASS (gs_shell_search_parent_class)->finalize (object);
}
/**
@@ -426,6 +437,7 @@ gs_shell_search_class_init (GsShellSearchClass *klass)
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
object_class->dispose = gs_shell_search_dispose;
+ object_class->finalize = gs_shell_search_finalize;
page_class->app_installed = gs_shell_search_app_installed;
page_class->app_removed = gs_shell_search_app_removed;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]