[gnome-photos] base-item: Don't leak the GFileInfo
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] base-item: Don't leak the GFileInfo
- Date: Fri, 1 Apr 2016 12:20:34 +0000 (UTC)
commit a0aeb74da414ccebabf208d4753c9fab5594c929
Author: Umang Jain <mailumangjain gmail com>
Date: Fri Mar 25 13:02:28 2016 +0530
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 3e253d7..fb3d835 100644
--- a/src/photos-base-item.c
+++ b/src/photos-base-item.c
@@ -760,7 +760,7 @@ photos_base_item_file_query_info (GObject *source_object, GAsyncResult *res, gpo
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)
@@ -784,6 +784,7 @@ photos_base_item_file_query_info (GObject *source_object, GAsyncResult *res, gpo
}
out:
+ g_clear_object (&info);
g_object_unref (self);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]