[tracker/wip/carlosg/coverity-warnings: 6/18] libtracker-data: Free variable using the right free function
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/wip/carlosg/coverity-warnings: 6/18] libtracker-data: Free variable using the right free function
- Date: Sun, 21 Mar 2021 20:56:34 +0000 (UTC)
commit c4a32473846f337ef1d1bbeda0cdd1819ebd6242
Author: Carlos Garnacho <carlosg gnome org>
Date: Sat Mar 20 11:30:45 2021 +0100
libtracker-data: Free variable using the right free function
This variable is allocated with sqlite3_malloc, should be freed with
sqlite3_free().
CID: #1501147
src/libtracker-data/tracker-vtab-triples.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/libtracker-data/tracker-vtab-triples.c b/src/libtracker-data/tracker-vtab-triples.c
index a81709cd0..081566ae0 100644
--- a/src/libtracker-data/tracker-vtab-triples.c
+++ b/src/libtracker-data/tracker-vtab-triples.c
@@ -192,7 +192,7 @@ triples_best_index (sqlite3_vtab *vtab,
continue;
if (info->aConstraint[i].iColumn == COL_ROWID) {
- g_free (idx_str);
+ sqlite3_free (idx_str);
return SQLITE_ERROR;
}
@@ -201,7 +201,7 @@ triples_best_index (sqlite3_vtab *vtab,
info->aConstraint[i].op != SQLITE_INDEX_CONSTRAINT_NE &&
info->aConstraint[i].op != SQLITE_INDEX_CONSTRAINT_ISNULL &&
info->aConstraint[i].op != SQLITE_INDEX_CONSTRAINT_ISNOTNULL) {
- g_free (idx_str);
+ sqlite3_free (idx_str);
return SQLITE_ERROR;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]