[td-225] fix memory leaks
This commit is contained in:
parent
b0807644a9
commit
8bdf3a05e0
|
@ -99,7 +99,7 @@ SConnObj *mnodeCreateConn(char *user, uint32_t ip, uint16_t port) {
|
||||||
tstrncpy(connObj.user, user, sizeof(connObj.user));
|
tstrncpy(connObj.user, user, sizeof(connObj.user));
|
||||||
|
|
||||||
SConnObj *pConn = taosCachePut(tsMnodeConnCache, &connId, sizeof(int32_t), &connObj, sizeof(connObj), CONN_KEEP_TIME);
|
SConnObj *pConn = taosCachePut(tsMnodeConnCache, &connId, sizeof(int32_t), &connObj, sizeof(connObj), CONN_KEEP_TIME);
|
||||||
|
|
||||||
mDebug("connId:%d, is created, user:%s ip:%s:%u", connId, user, taosIpStr(ip), port);
|
mDebug("connId:%d, is created, user:%s ip:%s:%u", connId, user, taosIpStr(ip), port);
|
||||||
return pConn;
|
return pConn;
|
||||||
}
|
}
|
||||||
|
|
|
@ -409,6 +409,7 @@ int32_t taosHashCondTraverse(SHashObj *pHashObj, bool (*fp)(void *, void *), voi
|
||||||
// not qualified, remove it
|
// not qualified, remove it
|
||||||
if (fp && (!fp(param, pNode->data))) {
|
if (fp && (!fp(param, pNode->data))) {
|
||||||
doPopFromEntryList(pEntry, pNode);
|
doPopFromEntryList(pEntry, pNode);
|
||||||
|
FREE_HASH_NODE(pNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
pNode = pNext;
|
pNode = pNext;
|
||||||
|
|
Loading…
Reference in New Issue