diff --git a/src/client/src/tscServer.c b/src/client/src/tscServer.c index 1e7ad937acaff0e9761b8cdaa6a6d9b3c1847b35..66d5e17747122dd5bd49574d81c14416047c3c49 100644 --- a/src/client/src/tscServer.c +++ b/src/client/src/tscServer.c @@ -1787,6 +1787,7 @@ int tscBuildHeartBeatMsg(SSqlObj *pSql, SSqlInfo *pInfo) { size = tscEstimateHeartBeatMsgLength(pSql); if (TSDB_CODE_SUCCESS != tscAllocPayload(pCmd, size)) { + pthread_mutex_unlock(&pObj->mutex); tscError("%p failed to malloc for heartbeat msg", pSql); return -1; } diff --git a/src/client/src/tscSubquery.c b/src/client/src/tscSubquery.c index d616a8bffa402ed8f2bcab6d8fa392c5de9c950c..3660c822d717569abe7964751ab2df73fa728c6a 100644 --- a/src/client/src/tscSubquery.c +++ b/src/client/src/tscSubquery.c @@ -1381,6 +1381,7 @@ static void tscRetrieveFromDnodeCallBack(void *param, TAOS_RES *tres, int numOfR } else { // all data has been retrieved to client tscAllDataRetrievedFromDnode(trsupport, pSql); } + pthread_mutex_unlock(&trsupport->queryMutex); } static SSqlObj *tscCreateSqlObjForSubquery(SSqlObj *pSql, SRetrieveSupport *trsupport, SSqlObj *prevSqlObj) { diff --git a/src/mnode/src/mgmtSdb.c b/src/mnode/src/mgmtSdb.c index 06cb9dca5cd68e56cd2dd8d16388b57792feb7f8..de68baf40fe4ab1b789c473c24009fb4a70e4e08 100644 --- a/src/mnode/src/mgmtSdb.c +++ b/src/mnode/src/mgmtSdb.c @@ -695,6 +695,7 @@ int32_t sdbUpdateRow(SSdbOperDesc *pOper) { int32_t total_size = sizeof(SRowHead) + pTable->maxRowSize + sizeof(TSCKSUM); SRowHead *rowHead = (SRowHead *)calloc(1, total_size); if (rowHead == NULL) { + pthread_mutex_unlock(&pTable->mutex); sdbError("table:%s, failed to allocate row head memory", pTable->tableName); return -1; }