[gnome-software] Fix a tiny memleak
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Fix a tiny memleak
- Date: Tue, 12 Jan 2016 09:47:09 +0000 (UTC)
commit ef0f76c56ef65abd7f5d31a874cba0a47c271dbc
Author: Kalev Lember <klember redhat com>
Date: Tue Jan 12 10:31:09 2016 +0100
Fix a tiny memleak
Free the container returned by g_variant_get, as documented in
https://developer.gnome.org/glib/stable/gvariant-format-strings.html#gvariant-format-strings-convenience
src/gs-application.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/gs-application.c b/src/gs-application.c
index 2174864..6a9862f 100644
--- a/src/gs-application.c
+++ b/src/gs-application.c
@@ -549,9 +549,9 @@ install_resources_activated (GSimpleAction *action,
#endif
const gchar *mode;
const gchar *startup_id;
- gchar **resources;
+ g_autofree gchar **resources = NULL;
- g_variant_get (parameter, "(&s^as&s)", &mode, &resources, &startup_id);
+ g_variant_get (parameter, "(&s^a&s&s)", &mode, &resources, &startup_id);
#ifdef GDK_WINDOWING_X11
display = gdk_display_get_default ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]