diff --git a/src/client/src/tscStream.c b/src/client/src/tscStream.c index 13e311a0b3998d9d40e03dddc805c7c9e972b6d9..f0f87f26db3990a5546a6dc7be75dfae68fa88a1 100644 --- a/src/client/src/tscStream.c +++ b/src/client/src/tscStream.c @@ -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; }