[gnome-software/wip/rancell/reviews] Fix crash due to autoptr freeing



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

    Fix crash due to autoptr freeing

 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 f64bb61..c192927 100644
--- a/src/plugins/gs-plugin-ubuntu-reviews.c
+++ b/src/plugins/gs-plugin-ubuntu-reviews.c
@@ -395,7 +395,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_object_ref (parser);
        }
 
        return TRUE;


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