[tracker: 8/21] libtracker-data: Fix memory leak in tracker_db_journal_reader_verify_last



commit 83e22a9e9030cd523e04d463a9a721f04d8da84b
Author: Andrea Azzarone <andrea azzarone canonical com>
Date:   Wed Jan 23 19:21:00 2019 +0000

    libtracker-data: Fix memory leak in tracker_db_journal_reader_verify_last
    
    Make sure db_journal_reader_clear is called in order to free allocated memory.

 src/libtracker-data/tracker-db-journal.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/libtracker-data/tracker-db-journal.c b/src/libtracker-data/tracker-db-journal.c
index 1fa93793d..0c5711494 100644
--- a/src/libtracker-data/tracker-db-journal.c
+++ b/src/libtracker-data/tracker-db-journal.c
@@ -1780,10 +1780,11 @@ tracker_db_journal_reader_verify_last (GFile   *data_location,
 
                        jreader.current = jreader.end - entry_size_check;
                        success = db_journal_reader_next (&jreader, FALSE, NULL);
-                       db_journal_reader_clear (&jreader);
                } else {
                        success = TRUE;
                }
+
+               db_journal_reader_clear (&jreader);
        }
 
        g_free (filename);


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