[tracker] libtracker-miner: Plug leak
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] libtracker-miner: Plug leak
- Date: Mon, 28 Nov 2016 01:01:21 +0000 (UTC)
commit a82e2760ac2093d64313f6b5014503ff8788cbcc
Author: Carlos Garnacho <carlosg gnome org>
Date: Sun Nov 27 19:50:43 2016 +0100
libtracker-miner: Plug leak
If the cursor returns no items, it would be leaked.
src/libtracker-miner/tracker-decorator-fs.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-decorator-fs.c b/src/libtracker-miner/tracker-decorator-fs.c
index af4fbf0..123b40e 100644
--- a/src/libtracker-miner/tracker-decorator-fs.c
+++ b/src/libtracker-miner/tracker-decorator-fs.c
@@ -316,8 +316,10 @@ tracker_decorator_fs_prepend_file (TrackerDecoratorFS *decorator,
if (!cursor)
return 0;
- if (!tracker_sparql_cursor_next (cursor, NULL, NULL))
+ if (!tracker_sparql_cursor_next (cursor, NULL, NULL)) {
+ g_object_unref (cursor);
return 0;
+ }
id = tracker_sparql_cursor_get_integer (cursor, 0);
class_id = tracker_sparql_cursor_get_integer (cursor, 1);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]