[tracker/wip/carlosg/coverity-fixes: 15/16] docs: Initialize variable




commit ae37000541534733d68ec0f6ba3cc8aad1dbef7a
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sat Oct 23 19:48:40 2021 +0200

    docs: Initialize variable
    
    We could fall on error paths here where desc_conn is not yet initialized
    to anything.
    
    CID: #1506770

 docs/tools/tracker-ontology-model.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/docs/tools/tracker-ontology-model.c b/docs/tools/tracker-ontology-model.c
index e2c40d8d4..7ecbd1af6 100644
--- a/docs/tools/tracker-ontology-model.c
+++ b/docs/tools/tracker-ontology-model.c
@@ -302,7 +302,7 @@ tracker_ontology_model_new (GFile   *ontology_location,
                            GError **error)
 {
        TrackerOntologyModel *model;
-       TrackerSparqlConnection *ontology_conn, *desc_conn;
+       TrackerSparqlConnection *ontology_conn, *desc_conn = NULL;
        GFileEnumerator *enumerator = NULL;
        GFileInfo *info;
        GFile *dsc_ontology;


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