Merge pull request #6172 from taosdata/cq

fix memory leak when calloc sqlstr error.
This commit is contained in:
DuanKuanJun 2021-05-21 15:06:16 +08:00 committed by GitHub
commit 0630af70b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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;
}