From 5227c732776147253f2b394e73cd6c70e8e3261e Mon Sep 17 00:00:00 2001 From: hjliao Date: Fri, 27 Sep 2019 14:53:14 +0800 Subject: [PATCH] fix bug #571 --- src/inc/sql.y | 1 + src/util/src/sql.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/src/inc/sql.y b/src/inc/sql.y index bf3c184a0f..b24902d678 100755 --- a/src/inc/sql.y +++ b/src/inc/sql.y @@ -236,6 +236,7 @@ create_table_args(A) ::= AS select(S). { %type column{TAOS_FIELD} %type columnlist{tFieldList*} +%destructor columnlist {tFieldListDestroy($$);} columnlist(A) ::= columnlist(X) COMMA column(Y). {A = tFieldListAppend(X, &Y); } columnlist(A) ::= column(X). {A = tFieldListAppend(NULL, &X);} diff --git a/src/util/src/sql.c b/src/util/src/sql.c index b402c85ca9..8cf76d44ab 100644 --- a/src/util/src/sql.c +++ b/src/util/src/sql.c @@ -1004,6 +1004,11 @@ static void yy_destructor( case 235: /* grouplist */ { tVariantListDestroy((yypminor->yy216)); +} + break; + case 213: /* columnlist */ +{ +tFieldListDestroy((yypminor->yy151)); } break; case 214: /* select */ -- GitLab