[gnome-photos/wip/rishi/dlna-renderer-fixes-00: 1/3] dlna-renderer: Don't leak the GError
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/wip/rishi/dlna-renderer-fixes-00: 1/3] dlna-renderer: Don't leak the GError
- Date: Tue, 23 Mar 2021 22:47:16 +0000 (UTC)
commit e00571f2b7bb80ed7e068c6c0eaa99267e65a6fc
Author: Debarshi Ray <debarshir gnome org>
Date: Tue Mar 23 23:16:32 2021 +0100
dlna-renderer: Don't leak the GError
src/photos-dlna-renderer.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/src/photos-dlna-renderer.c b/src/photos-dlna-renderer.c
index 18656432..56ab6a77 100644
--- a/src/photos-dlna-renderer.c
+++ b/src/photos-dlna-renderer.c
@@ -619,16 +619,18 @@ photos_dlna_renderer_unshare_all_unshare_cb (GObject *source_object,
PhotosDlnaRenderer *self = PHOTOS_DLNA_RENDERER (source_object);
g_autoptr (GTask) task = G_TASK (user_data);
guint remaining;
- GError *error = NULL;
/* decrement the remaining count */
remaining = GPOINTER_TO_UINT (g_task_get_task_data (task));
g_task_set_task_data (task, GUINT_TO_POINTER (--remaining), NULL);
- photos_dlna_renderer_unshare_finish (self, res, &error);
+ {
+ g_autoptr (GError) error = NULL;
- if (error != NULL)
- g_warning ("Unable to unshare item: %s", error->message);
+ photos_dlna_renderer_unshare_finish (self, res, &error);
+ if (error != NULL)
+ g_warning ("Unable to unshare item: %s", error->message);
+ }
if (remaining == 0)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]