[gnome-photos] utils: Don't leak the query string
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] utils: Don't leak the query string
- Date: Sat, 9 Jul 2016 12:17:05 +0000 (UTC)
commit a5e4cffa9a963bef1077fe844089e0146f5c68f4
Author: Debarshi Ray <debarshir gnome org>
Date: Fri Jul 8 09:36:40 2016 +0200
utils: Don't leak the query string
https://bugzilla.gnome.org/show_bug.cgi?id=768548
src/photos-utils.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/photos-utils.c b/src/photos-utils.c
index 64827b7..0e5951a 100644
--- a/src/photos-utils.c
+++ b/src/photos-utils.c
@@ -1429,7 +1429,7 @@ photos_utils_set_favorite (const gchar *urn, gboolean is_favorite)
{
GError *error;
PhotosTrackerQueue *queue = NULL;
- gchar *sparql;
+ gchar *sparql = NULL;
sparql = g_strdup_printf ("%s { <%s> nao:hasTag nao:predefined-tag-favorite }",
(is_favorite) ? "INSERT OR REPLACE" : "DELETE",
@@ -1447,5 +1447,6 @@ photos_utils_set_favorite (const gchar *urn, gboolean is_favorite)
photos_tracker_queue_update (queue, sparql, NULL, photos_utils_update_executed, g_strdup (urn), g_free);
out:
+ g_free (sparql);
g_clear_object (&queue);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]