diff --git a/source/client/src/clientImpl.c b/source/client/src/clientImpl.c index 18cdd58639..5b559451da 100644 --- a/source/client/src/clientImpl.c +++ b/source/client/src/clientImpl.c @@ -2895,6 +2895,10 @@ TAOS_RES* taosQueryImpl(TAOS* taos, const char* sql, bool validateOnly, int8_t s taosMemoryFree(param); return NULL; } + code = tsem_destroy(¶m->sem); + if(TSDB_CODE_SUCCESS != code) { + tscError("failed to destroy semaphore since %s", tstrerror(code)); + } SRequestObj* pRequest = NULL; if (param->pRequest != NULL) {