[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: Fri, 1 Apr 2016 22:32:47 +0000 (UTC)
commit aeeacb39f18852794ff8d5826c991c2299f38180
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 98b2d50..886eecc 100644
--- a/src/photos-base-item.c
+++ b/src/photos-base-item.c
@@ -741,7 +741,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)
@@ -765,6 +765,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]