fix mem leak
This commit is contained in:
parent
54b7e1b294
commit
52e05bbfe6
|
@ -540,12 +540,6 @@ int32_t catalogGetHandle(uint64_t clusterId, SCatalog** catalogHandle) {
|
||||||
CTG_ERR_JRET(TSDB_CODE_CTG_MEM_ERROR);
|
CTG_ERR_JRET(TSDB_CODE_CTG_MEM_ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
SHashObj *metaCache = taosHashInit(gCtgMgmt.cfg.maxTblCacheNum, taosGetDefaultHashFunction(TSDB_DATA_TYPE_BINARY), true, HASH_ENTRY_LOCK);
|
|
||||||
if (NULL == metaCache) {
|
|
||||||
qError("taosHashInit failed, num:%d", gCtgMgmt.cfg.maxTblCacheNum);
|
|
||||||
CTG_ERR_RET(TSDB_CODE_CTG_MEM_ERROR);
|
|
||||||
}
|
|
||||||
|
|
||||||
code = taosHashPut(gCtgMgmt.pCluster, &clusterId, sizeof(clusterId), &clusterCtg, POINTER_BYTES);
|
code = taosHashPut(gCtgMgmt.pCluster, &clusterId, sizeof(clusterId), &clusterCtg, POINTER_BYTES);
|
||||||
if (code) {
|
if (code) {
|
||||||
if (HASH_NODE_EXIST(code)) {
|
if (HASH_NODE_EXIST(code)) {
|
||||||
|
|
Loading…
Reference in New Issue