[gnome-software: 1/2] gs-odrs-provider: Fix leak of reviews objects
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software: 1/2] gs-odrs-provider: Fix leak of reviews objects
- Date: Fri, 11 Mar 2022 10:41:57 +0000 (UTC)
commit 66098b1d70c766942efb5513792538243aeba43e
Author: Philip Withnall <pwithnall endlessos org>
Date: Thu Mar 10 14:17:04 2022 +0000
gs-odrs-provider: Fix leak of reviews objects
`refine_reviews_cb()` was treating
`gs_odrs_provider_fetch_reviews_for_app_finish()` as having a boolean
return value when actually it returned the list of reviews (which had
also been set on the app). Turn it into a boolean return value.
Signed-off-by: Philip Withnall <pwithnall endlessos org>
lib/gs-odrs-provider.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/lib/gs-odrs-provider.c b/lib/gs-odrs-provider.c
index 891724cae..40a14bcfa 100644
--- a/lib/gs-odrs-provider.c
+++ b/lib/gs-odrs-provider.c
@@ -760,7 +760,7 @@ gs_odrs_provider_fetch_reviews_for_app_async (GsOdrsProvider *self,
g_task_return_error (task, g_steal_pointer (&local_error));
} else {
set_reviews_on_app (self, app, reviews);
- g_task_return_pointer (task, g_steal_pointer (&reviews), (GDestroyNotify)
g_ptr_array_unref);
+ g_task_return_boolean (task, TRUE);
}
return;
@@ -914,7 +914,7 @@ parse_reviews_cb (GObject *source_object,
set_reviews_on_app (self, data->app, reviews);
/* success */
- g_task_return_pointer (task, g_steal_pointer (&reviews), (GDestroyNotify) g_ptr_array_unref);
+ g_task_return_boolean (task, TRUE);
}
static void
@@ -945,12 +945,12 @@ set_reviews_on_app (GsOdrsProvider *self,
}
}
-static GPtrArray *
+static gboolean
gs_odrs_provider_fetch_reviews_for_app_finish (GsOdrsProvider *self,
GAsyncResult *result,
GError **error)
{
- return g_task_propagate_pointer (G_TASK (result), error);
+ return g_task_propagate_boolean (G_TASK (result), error);
}
static gchar *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]