[tarantool-patches] Re: [PATCH] sql: clean up lemon acttab_free() a bit
n.pettik
korablev at tarantool.org
Wed Jan 9 17:42:17 MSK 2019
> On 9 Jan 2019, at 13:57, Alexander Turenko <alexander.turenko at 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.
More information about the Tarantool-patches
mailing list