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 0B6DE291CE 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 a4OOWWpaXOCn 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 646CA2913E for ; Fri, 31 Aug 2018 11:45:50 -0400 (EDT) From: Kirill Shcherbatov Subject: [tarantool-patches] [PATCH v1 2/3] sql: fix sql_*_compile functions leak on error Date: Fri, 31 Aug 2018 18:45:41 +0300 Message-Id: <2cb7b040d65c03ef2e52b7ea634f9b2861ea838b.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/prepare.c | 1 - src/box/sql/tokenize.c | 1 - 2 files changed, 2 deletions(-) diff --git a/src/box/sql/prepare.c b/src/box/sql/prepare.c index e8b8e94..a6af683 100644 --- a/src/box/sql/prepare.c +++ b/src/box/sql/prepare.c @@ -279,7 +279,6 @@ sqlite3Prepare(sqlite3 * db, /* Database handle. */ if (zErrMsg) { sqlite3ErrorWithMsg(db, rc, "%s", zErrMsg); - sqlite3DbFree(db, zErrMsg); } else { sqlite3Error(db, rc); } diff --git a/src/box/sql/tokenize.c b/src/box/sql/tokenize.c index ce9ed84..ec06456 100644 --- a/src/box/sql/tokenize.c +++ b/src/box/sql/tokenize.c @@ -523,7 +523,6 @@ sqlite3RunParser(Parse * pParse, const char *zSql, char **pzErrMsg) if (pParse->zErrMsg) { *pzErrMsg = pParse->zErrMsg; sqlite3_log(pParse->rc, "%s", *pzErrMsg); - pParse->zErrMsg = 0; nErr++; } if (pParse->pVdbe != NULL && pParse->nErr > 0) { -- 2.7.4