[xdg-desktop-portal-gnome/wip/rishi/coverity-fixes-00: 1/4] wallpaperdialog: Don't leak the temporary GFile




commit af8759313ef1b66d38a7d0f13f836c274944557e
Author: Debarshi Ray <debarshir gnome org>
Date:   Thu Jun 30 17:57:10 2022 +0200

    wallpaperdialog: Don't leak the temporary GFile

 src/wallpaperdialog.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/wallpaperdialog.c b/src/wallpaperdialog.c
index fc7cc6c..999e121 100644
--- a/src/wallpaperdialog.c
+++ b/src/wallpaperdialog.c
@@ -119,7 +119,7 @@ on_image_loaded_cb (GObject *source_object,
   WallpaperDialog *self = data;
   GFileIOStream *stream = NULL;
   GFile *image_file = G_FILE (source_object);
-  GFile *tmp = g_file_new_tmp ("XXXXXX", &stream, NULL);
+  g_autoptr(GFile) tmp = g_file_new_tmp ("XXXXXX", &stream, NULL);
   g_autoptr(GError) error = NULL;
   gchar *contents = NULL;
   gsize length = 0;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]