From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id D170E2A224 for ; Thu, 29 Mar 2018 06:18:31 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uiZqA31Q332j for ; Thu, 29 Mar 2018 06:18:31 -0400 (EDT) Received: from smtp45.i.mail.ru (smtp45.i.mail.ru [94.100.177.105]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 8966A2A1B7 for ; Thu, 29 Mar 2018 06:18:31 -0400 (EDT) From: AKhatskevich Subject: [tarantool-patches] [PATCH 2/3] sql: fix memory leak Date: Thu, 29 Mar 2018 13:17:51 +0300 Message-Id: In-Reply-To: References: In-Reply-To: References: Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-subscribe: List-owner: List-post: List-archive: To: tarantool-patches@freelists.org Cc: AKhatskevich 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