From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org> To: tarantool-patches@freelists.org Subject: [tarantool-patches] Re: [PATCH v1 2/2] sql: fixed possible leak in sqlite3EndTable Date: Fri, 13 Jul 2018 13:26:09 +0300 [thread overview] Message-ID: <08d51d31-a944-e308-c1c2-bf823581607e@tarantool.org> (raw) In-Reply-To: <b308b66901143da53bcbdef5afef2b0f23565e05.1531413185.git.kshcherbatov@tarantool.org> Thanks for the patch! See 1 comment below. On 12/07/2018 19:34, Kirill Shcherbatov wrote: > --- > src/box/sql/build.c | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) > > diff --git a/src/box/sql/build.c b/src/box/sql/build.c > index 946b10c..200f7e8 100644 > --- a/src/box/sql/build.c > +++ b/src/box/sql/build.c > @@ -1795,7 +1795,7 @@ sqlite3EndTable(Parse * pParse, /* Parse context */ > */ > struct ExprList *old_checks = p->def->opts.checks; > if (sql_table_def_rebuild(db, p) != 0) > - return; > + goto cleanup; > sql_expr_list_delete(db, old_checks); > } I see two returns below this line. Why have not you replaced them with goto cleanup? > > @@ -1923,6 +1923,7 @@ sqlite3EndTable(Parse * pParse, /* Parse context */ > * don't require make a copy on space_def_dup and to improve > * debuggability. > */ > +cleanup: > sql_expr_list_delete(db, p->def->opts.checks); > p->def->opts.checks = NULL; > } >
next prev parent reply other threads:[~2018-07-13 10:26 UTC|newest] Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-07-12 16:34 [tarantool-patches] [PATCH v1 0/2] sql: restrict nullable action definitions Kirill Shcherbatov 2018-07-12 16:34 ` [tarantool-patches] [PATCH v1 1/2] " Kirill Shcherbatov 2018-07-13 10:26 ` [tarantool-patches] " Vladislav Shpilevoy 2018-07-13 16:05 ` Kirill Shcherbatov 2018-07-13 20:03 ` Vladislav Shpilevoy 2018-07-16 9:43 ` Kirill Shcherbatov 2018-07-16 10:20 ` Vladislav Shpilevoy 2018-07-16 12:27 ` Kirill Shcherbatov 2018-07-12 16:34 ` [tarantool-patches] [PATCH v1 2/2] sql: fixed possible leak in sqlite3EndTable Kirill Shcherbatov 2018-07-13 10:26 ` Vladislav Shpilevoy [this message] 2018-07-13 16:05 ` [tarantool-patches] " Kirill Shcherbatov 2018-07-13 10:26 ` [tarantool-patches] Re: [PATCH v1 0/2] sql: restrict nullable action definitions Vladislav Shpilevoy 2018-07-16 12:28 ` [tarantool-patches] [PATCH v1 2/4] sql: refactor sqlite3AddNotNull function Kirill Shcherbatov 2018-07-16 13:41 ` [tarantool-patches] " Vladislav Shpilevoy 2018-07-16 12:28 ` [tarantool-patches] [PATCH v1 4/4] sql: get rid of Column structure Kirill Shcherbatov 2018-07-16 13:40 ` [tarantool-patches] " Vladislav Shpilevoy 2018-07-16 16:33 ` Kirill Shcherbatov 2018-07-17 9:32 ` Vladislav Shpilevoy 2018-07-17 14:08 ` Kirill Shcherbatov 2018-07-17 22:01 ` Vladislav Shpilevoy 2018-07-18 7:25 ` Kirill Shcherbatov 2018-07-18 8:04 ` Vladislav Shpilevoy 2018-07-18 16:41 ` n.pettik
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=08d51d31-a944-e308-c1c2-bf823581607e@tarantool.org \ --to=v.shpilevoy@tarantool.org \ --cc=tarantool-patches@freelists.org \ --subject='[tarantool-patches] Re: [PATCH v1 2/2] sql: fixed possible leak in sqlite3EndTable' \ /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