[gnome-software/wip/temp/ubuntu-xenial-rebased: 124/329] Fix crash due to reference disappearing



commit 375df348861f53a9223d9fa8f818d03befb0a433
Author: William Hua <william hua canonical com>
Date:   Tue Mar 1 08:58:32 2016 -0500

    Fix crash due to reference disappearing
    
    We need to steal the reference since it's a g_autoptr.

 src/plugins/gs-plugin-ubuntu-reviews.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/plugins/gs-plugin-ubuntu-reviews.c b/src/plugins/gs-plugin-ubuntu-reviews.c
index 27758b2..478752c 100644
--- a/src/plugins/gs-plugin-ubuntu-reviews.c
+++ b/src/plugins/gs-plugin-ubuntu-reviews.c
@@ -773,7 +773,7 @@ send_review_request (GsPlugin *plugin, const gchar *method, const gchar *path, J
                if (!json_parser_load_from_data (parser, msg->response_body->data, -1, error)) {
                        return FALSE;
                }
-               *result = parser;
+               *result = g_steal_pointer (&parser);
        }
 
        return TRUE;


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