Tarantool development patches archive
 help / color / mirror / Atom feed
From: "n.pettik" <korablev@tarantool.org>
To: tarantool-patches@freelists.org
Cc: Alexander Turenko <alexander.turenko@tarantool.org>
Subject: [tarantool-patches] Re: [PATCH] sql: clean up lemon acttab_free() a bit
Date: Wed, 9 Jan 2019 16:42:17 +0200	[thread overview]
Message-ID: <0FDE4101-E54C-4C68-81A0-79A1CED94E37@tarantool.org> (raw)
In-Reply-To: <200cdf0164eca9bc411c0b9277b78984c8df90db.1547035031.git.alexander.turenko@tarantool.org>



> On 9 Jan 2019, at 13:57, Alexander Turenko <alexander.turenko@tarantool.org> wrote:
> 
> Nikita Pettik suggests me that free(NULL) is no-op according to POSIX.
> 
> This is follow up of 9dbcaa3afae39cc46a8e6da5e00b5d62179ed016.
> ---
> 
> no issue
> https://github.com/tarantool/tarantool/tree/Totktonada/fix-lemon-leak-follow-up
> 
> extra/lemon.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/extra/lemon.c b/extra/lemon.c
> index 1efaac9e6..f245e7cf7 100644
> --- a/extra/lemon.c
> +++ b/extra/lemon.c
> @@ -599,10 +599,8 @@ struct acttab {
> /* Free all memory associated with the given acttab */
> void acttab_free(acttab *p){
>   assert(p);
> -  if (p->aAction)
> -    free( p->aAction );
> -  if (p->aLookahead)
> -    free( p->aLookahead );
> +  free( p->aAction );
> +  free( p->aLookahead );
>   free( p );
> }

Previous patch was pushed without review.
This one LGTM as obvious.

      reply	other threads:[~2019-01-09 14:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-09 11:57 [tarantool-patches] " Alexander Turenko
2019-01-09 14:42 ` n.pettik [this message]

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=0FDE4101-E54C-4C68-81A0-79A1CED94E37@tarantool.org \
    --to=korablev@tarantool.org \
    --cc=alexander.turenko@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='[tarantool-patches] Re: [PATCH] sql: clean up lemon acttab_free() a bit' \
    /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