[gnome-software/wip/temp/ubuntu-xenial-rebased-corrected: 121/331] Fix crash due to reference disappearing
- From: William Hua <williamhua src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/temp/ubuntu-xenial-rebased-corrected: 121/331] Fix crash due to reference disappearing
- Date: Wed, 4 May 2016 14:08:41 +0000 (UTC)
commit 07910b2b8ee008a26e0ea8db328cdd4a2da0f0e9
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 da62250..f0c440f 100644
--- a/src/plugins/gs-plugin-ubuntu-reviews.c
+++ b/src/plugins/gs-plugin-ubuntu-reviews.c
@@ -774,7 +774,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]