[gnome-photos/wip/rishi/dlna-renderers-dialog-g_auto: 1/3] dlna-renderers-dialog: Don't leak the GdkPixbuf
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/wip/rishi/dlna-renderers-dialog-g_auto: 1/3] dlna-renderers-dialog: Don't leak the GdkPixbuf
- Date: Wed, 7 Apr 2021 22:28:54 +0000 (UTC)
commit 0d3853a35e03912615e1ed194706346629157807
Author: Debarshi Ray <debarshir gnome org>
Date: Thu Apr 8 00:08:04 2021 +0200
dlna-renderers-dialog: Don't leak the GdkPixbuf
src/photos-dlna-renderers-dialog.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/src/photos-dlna-renderers-dialog.c b/src/photos-dlna-renderers-dialog.c
index ffec403a..dc7a4596 100644
--- a/src/photos-dlna-renderers-dialog.c
+++ b/src/photos-dlna-renderers-dialog.c
@@ -128,7 +128,7 @@ photos_dlna_renderers_dialog_set_icon_cb (GObject *source_object,
GAsyncResult *res,
gpointer user_data)
{
- GdkPixbuf *pixbuf;
+ GdkPixbuf *pixbuf = NULL;
GtkImage *image = GTK_IMAGE (user_data);
PhotosDlnaRenderer *renderer = PHOTOS_DLNA_RENDERER (source_object);
GError *error = NULL;
@@ -144,6 +144,8 @@ photos_dlna_renderers_dialog_set_icon_cb (GObject *source_object,
gtk_image_set_from_pixbuf (image, pixbuf);
out:
+ g_clear_object (&pixbuf);
+
/* release the ref we took before the async call */
g_object_unref (image);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]