[fix bug: no free pSql]

This commit is contained in:
Hui Li 2020-07-08 09:05:18 +08:00
parent 4e1b995372
commit 4dadf6ad64
1 changed files with 3 additions and 2 deletions

View File

@ -206,9 +206,10 @@ static void shellSourceFile(TAOS *con, char *fptr) {
if (code != 0) {
fprintf(stderr, "DB error: %s: %s (%d)\n", taos_errstr(con), fname, lineNo);
/* free local resouce: allocated memory/metric-meta refcnt */
taos_free_result(pSql);
}
/* free local resouce: allocated memory/metric-meta refcnt */
taos_free_result(pSql);
memset(cmd, 0, MAX_COMMAND_SIZE);
cmd_len = 0;