[tarantool-patches] [PATCH v1 1/3] sql: fix sql_check_list_item_init double free
Kirill Shcherbatov
kshcherbatov at tarantool.org
Fri Aug 31 18:45:40 MSK 2018
---
src/box/sql.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/box/sql.c b/src/box/sql.c
index b158c50..d3f50c5 100644
--- a/src/box/sql.c
+++ b/src/box/sql.c
@@ -1711,10 +1711,9 @@ sql_check_list_item_init(struct ExprList *expr_list, int column,
}
if (expr_str != NULL) {
item->pExpr = sql_expr_compile(db, expr_str, expr_str_len);
- if (item->pExpr == NULL) {
- sqlite3DbFree(db, item->zName);
+ /* The item->zName would be released later. */
+ if (item->pExpr == NULL)
return -1;
- }
}
return 0;
}
--
2.7.4
More information about the Tarantool-patches
mailing list