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



commit 7e9b14b4961ca5be0a968b9ac1b7e33caf7d74b7
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]