Tarantool development patches archive
 help / color / mirror / Atom feed
From: Kirill Shcherbatov <kshcherbatov@tarantool.org>
To: tarantool-patches@freelists.org
Cc: korablev@tarantool.org, Kirill Shcherbatov <kshcherbatov@tarantool.org>
Subject: [tarantool-patches] [PATCH v1 2/3] sql: fix sql_*_compile functions leak on error
Date: Fri, 31 Aug 2018 18:45:41 +0300	[thread overview]
Message-ID: <2cb7b040d65c03ef2e52b7ea634f9b2861ea838b.1535730218.git.kshcherbatov@tarantool.org> (raw)
In-Reply-To: <cover.1535730218.git.kshcherbatov@tarantool.org>
In-Reply-To: <cover.1535730218.git.kshcherbatov@tarantool.org>

---
 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

  parent reply	other threads:[~2018-08-31 15:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-31 15:45 [tarantool-patches] [PATCH v1 0/3] sql: dissallow bindings for DDL Kirill Shcherbatov
2018-08-31 15:45 ` [tarantool-patches] [PATCH v1 1/3] sql: fix sql_check_list_item_init double free Kirill Shcherbatov
2018-08-31 15:45 ` Kirill Shcherbatov [this message]
2018-08-31 15:45 ` [tarantool-patches] [PATCH v1 3/3] sql: dissallow bindings for DDL Kirill Shcherbatov
2018-09-04 11:00   ` [tarantool-patches] " n.pettik
2018-09-06 13:04     ` Kirill Shcherbatov
2018-09-10 21:52       ` n.pettik
2018-09-11  7:21         ` Kirill Shcherbatov
2018-09-11 23:03           ` n.pettik
2018-09-13  6:13             ` Kirill Shcherbatov
2018-09-13 10:12 ` [tarantool-patches] Re: [PATCH v1 0/3] " Kirill Yukhin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2cb7b040d65c03ef2e52b7ea634f9b2861ea838b.1535730218.git.kshcherbatov@tarantool.org \
    --to=kshcherbatov@tarantool.org \
    --cc=korablev@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='Re: [tarantool-patches] [PATCH v1 2/3] sql: fix sql_*_compile functions leak on error' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox