[xdg-desktop-portal-gnome/wip/rishi/coverity-fixes-00: 1/4] wallpaperdialog: Don't leak the temporary GFile
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [xdg-desktop-portal-gnome/wip/rishi/coverity-fixes-00: 1/4] wallpaperdialog: Don't leak the temporary GFile
- Date: Thu, 30 Jun 2022 17:54:33 +0000 (UTC)
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]