diff --git a/src/client/src/tscStream.c b/src/client/src/tscStream.c index 4a1f4d9d87..da9497dda5 100644 --- a/src/client/src/tscStream.c +++ b/src/client/src/tscStream.c @@ -615,10 +615,9 @@ void taos_close_stream(TAOS_STREAM *handle) { tscDebug("%p stream:%p is closed", pSql, pStream); // notify CQ to release the pStream object pStream->fp(pStream->param, NULL, NULL); + taos_free_result(pSql); - tscFreeSqlObj(pSql); pStream->pSql = NULL; - taosTFree(pStream); } }