[tracker/wip/carlosg/coverity-warnings: 13/27] libtracker-data: Use the right free function on variable




commit 7ab71bcb694d80a54b1d08774b6b2e81ab3bed05
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sat Mar 20 11:27:16 2021 +0100

    libtracker-data: Use the right free function on variable
    
    This variable is allocated using g_new0(), so should be freed using
    g_free().
    
    CIDs: #1501119, #1501133

 src/libtracker-data/tracker-db-interface-sqlite.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/libtracker-data/tracker-db-interface-sqlite.c 
b/src/libtracker-data/tracker-db-interface-sqlite.c
index 0be15c283..921fa07b1 100644
--- a/src/libtracker-data/tracker-db-interface-sqlite.c
+++ b/src/libtracker-data/tracker-db-interface-sqlite.c
@@ -1399,7 +1399,7 @@ function_sparql_normalize (sqlite3_context *context,
                char zBuf[128];
                sqlite3_snprintf (128, zBuf, "ICU error: unorm_normalize: %s", u_errorName (status));
                zBuf[127] = '\0';
-               sqlite3_free (zOutput);
+               g_free (zOutput);
                result_context_function_error (context, fn, zBuf);
                return;
        }
@@ -1439,7 +1439,7 @@ function_sparql_unaccent (sqlite3_context *context,
                char zBuf[128];
                sqlite3_snprintf (128, zBuf, "ICU error: unorm_normalize: %s", u_errorName (status));
                zBuf[127] = '\0';
-               sqlite3_free (zOutput);
+               g_free (zOutput);
                result_context_function_error (context, fn, zBuf);
                return;
        }


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