summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Withnall <philip@tecnocode.co.uk>2017-01-25 00:56:32 +0000
committerPhilip Withnall <withnall@endlessm.com>2017-01-25 11:38:57 +0000
commit9d9b2c8a50540c4db3324ff82eef53bd67c1f95f (patch)
tree92258e0ef2b8559645855b55b29ad56aa37e7b66
parent4759c388cfcbdc960e893c68a2890078b68e4cc2 (diff)
downloadtracker-9d9b2c8a50540c4db3324ff82eef53bd67c1f95f.tar.gz
libtracker-miner: Fix use of an uninitialised variable
In the error path, finish_current_directory() was called on `notifier` before it had been initialised. Coverity CID: 1397952 https://bugzilla.gnome.org/show_bug.cgi?id=777725
-rw-r--r--src/libtracker-miner/tracker-file-notifier.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/libtracker-miner/tracker-file-notifier.c b/src/libtracker-miner/tracker-file-notifier.c
index 5b1abe095..139f44ed5 100644
--- a/src/libtracker-miner/tracker-file-notifier.c
+++ b/src/libtracker-miner/tracker-file-notifier.c
@@ -772,7 +772,7 @@ sparql_contents_query_cb (GObject *object,
GAsyncResult *result,
gpointer user_data)
{
- TrackerFileNotifier *notifier;
+ TrackerFileNotifier *notifier = TRACKER_FILE_NOTIFIER (user_data);
TrackerSparqlCursor *cursor;
GError *error = NULL;
@@ -786,8 +786,6 @@ sparql_contents_query_cb (GObject *object,
goto out;
}
- notifier = user_data;
-
if (cursor) {
sparql_contents_check_deleted (notifier, cursor);
g_object_unref (cursor);