[gnome-software/wip/temp/ubuntu-xenial-rebased-corrected: 169/331] Fix memory error



commit b69018d3dcdd78d431625c87b9977794f39c19fd
Author: Robert Ancell <robert ancell canonical com>
Date:   Thu Mar 24 16:02:24 2016 +1300

    Fix memory error

 src/plugins/gs-plugin-snappy.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/plugins/gs-plugin-snappy.c b/src/plugins/gs-plugin-snappy.c
index 8357cfa..75f0e5d 100644
--- a/src/plugins/gs-plugin-snappy.c
+++ b/src/plugins/gs-plugin-snappy.c
@@ -463,7 +463,7 @@ send_package_action (GsPlugin *plugin, const char *id, const gchar *action, GErr
        root = json_node_get_object (json_parser_get_root (parser));
        result = json_object_get_object_member (root, "result");
        resource_path = json_object_get_string_member (result, "resource");
-       status = json_object_get_string_member (result, "status");
+       status = g_strdup (json_object_get_string_member (result, "status"));
        while (g_strcmp0 (status, "running") == 0) {
                g_autofree gchar *status_reason_phrase = NULL, *status_response_type = NULL, *status_response 
= NULL;
                g_autoptr(JsonParser) status_parser = NULL;


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