[tarantool-patches] [PATCH 2/3] sql: fix memory leak
AKhatskevich
avkhatskevich at tarantool.org
Thu Mar 29 13:17:51 MSK 2018
index_def_new makes its own copy of key_def, so it should be deleted.
---
src/box/sql.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/box/sql.c b/src/box/sql.c
index 224747157..98bcd93ca 100644
--- a/src/box/sql.c
+++ b/src/box/sql.c
@@ -442,6 +442,7 @@ int tarantoolSqlite3EphemeralCreate(BtCursor *pCur, uint32_t field_count,
index_def_new(0 /*space id */, 0 /* index id */, "ephemer_idx",
strlen("ephemer_idx"), TREE, &index_opts_default,
ephemer_key_def, NULL /* pk def */);
+ key_def_delete(ephemer_key_def);
struct rlist key_list;
rlist_create(&key_list);
--
2.14.1
More information about the Tarantool-patches
mailing list