[tracker/tracker-1.10] libtracker-miner: Fix use of an uninitialised variable



commit 9b7accb6d8cba6eb2c782cdf4d1085cc89460c39
Author: Philip Withnall <philip tecnocode co uk>
Date:   Wed Jan 25 00:56:32 2017 +0000

    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

 src/libtracker-miner/tracker-file-notifier.c |    4 +---
 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 5b1abe0..139f44e 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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]