fix memory leak when calloc sqlstr error.

This commit is contained in:
tickduan 2021-05-20 14:23:01 +08:00
parent 4697cdfdaf
commit 3500811178
1 changed files with 1 additions and 0 deletions

View File

@ -623,6 +623,7 @@ TAOS_STREAM *taos_open_stream(TAOS *taos, const char *sqlstr, void (*fp)(void *p
if (pSql->sqlstr == NULL) {
tscError("0x%"PRIx64" failed to malloc sql string buffer", pSql->self);
tscFreeSqlObj(pSql);
free(pStream);
return NULL;
}