[tracker] libtracker-data: Initialize cursor variable
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] libtracker-data: Initialize cursor variable
- Date: Sat, 12 Aug 2017 20:18:25 +0000 (UTC)
commit ead23a7e0c76fb9b6174d598d939f644476538b9
Author: Carlos Garnacho <carlosg gnome org>
Date: Sat Aug 12 22:13:03 2017 +0200
libtracker-data: Initialize cursor variable
The variable may be used uninitialized, resulting on
invalid reads.
Spotted by Coverity (CID #1453480)
src/libtracker-data/tracker-data-manager.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/libtracker-data/tracker-data-manager.c b/src/libtracker-data/tracker-data-manager.c
index 1375c1f..bfd4727 100644
--- a/src/libtracker-data/tracker-data-manager.c
+++ b/src/libtracker-data/tracker-data-manager.c
@@ -4749,7 +4749,7 @@ data_manager_check_perform_cleanup (TrackerDataManager *manager)
{
TrackerDBStatement *stmt;
TrackerDBInterface *iface;
- TrackerDBCursor *cursor;
+ TrackerDBCursor *cursor = NULL;
guint count = 0;
iface = tracker_db_manager_get_writable_db_interface (manager->db_manager);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]