[gnome-photos/gnome-3-20] base-item: Don't leak the GFileInfo
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/gnome-3-20] base-item: Don't leak the GFileInfo
- Date: Thu, 24 Mar 2016 11:40:19 +0000 (UTC)
commit e88832dc202fe21ea8c92cdfee6a1cec04490b7d
Author: Debarshi Ray <debarshir gnome org>
Date: Thu Mar 24 12:07:28 2016 +0100
base-item: Don't leak the GFileInfo
https://bugzilla.gnome.org/show_bug.cgi?id=763908
src/photos-base-item.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/photos-base-item.c b/src/photos-base-item.c
index 32c7bc3..98b2d50 100644
--- a/src/photos-base-item.c
+++ b/src/photos-base-item.c
@@ -673,7 +673,7 @@ photos_base_item_thumbnail_path_info (GObject *source_object, GAsyncResult *res,
PhotosBaseItemPrivate *priv = self->priv;
GError *error = NULL;
GFile *file = G_FILE (source_object);
- GFileInfo *info;
+ GFileInfo *info = NULL;
info = g_file_query_info_finish (file, res, &error);
if (error != NULL)
@@ -697,6 +697,7 @@ photos_base_item_thumbnail_path_info (GObject *source_object, GAsyncResult *res,
}
out:
+ g_clear_object (&info);
g_object_unref (self);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]