[gnome-software/wip/rancell/reviews] Fix crash due to reference disappearing
- From: William Hua <williamhua src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/rancell/reviews] Fix crash due to reference disappearing
- Date: Tue, 1 Mar 2016 16:09:51 +0000 (UTC)
commit 3829ddef521b8b91bd217a84a2d713e57c44bf62
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 give back a reference because the g_autoptr causes it to
disappear before it's given back to the caller.
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..b6ffdad 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_steal_pointer (&parser);
}
return TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]