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 0EF692926D for ; Fri, 31 Aug 2018 11:45:51 -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 KHXrny_KlZTu for ; Fri, 31 Aug 2018 11:45:50 -0400 (EDT) Received: from smtp49.i.mail.ru (smtp49.i.mail.ru [94.100.177.109]) (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 642782908A for ; Fri, 31 Aug 2018 11:45:50 -0400 (EDT) From: Kirill Shcherbatov Subject: [tarantool-patches] [PATCH v1 1/3] sql: fix sql_check_list_item_init double free Date: Fri, 31 Aug 2018 18:45:40 +0300 Message-Id: <736e332ce97169cfded6ab6979404d99ee0404a5.1535730218.git.kshcherbatov@tarantool.org> 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: korablev@tarantool.org, Kirill Shcherbatov --- 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