From 8acf2939d663f986372c0dd1bc710967ae127f07 Mon Sep 17 00:00:00 2001 From: Alexander Turenko <alexander.turenko@tarantool.org> Date: Wed, 9 Jan 2019 14:51:49 +0300 Subject: [PATCH] sql: clean up lemon acttab_free() a bit Nikita Pettik suggests me that free(NULL) is no-op according to POSIX. This is follow up of 9dbcaa3afae39cc46a8e6da5e00b5d62179ed016. --- extra/lemon.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/extra/lemon.c b/extra/lemon.c index 1efaac9e64..f245e7cf76 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 ); } -- GitLab