fix: db cfg memory issue

This commit is contained in:
dapan1121 2023-05-19 16:48:05 +08:00
parent 6a1eb62dd4
commit 6e6853413c
1 changed files with 3 additions and 1 deletions

View File

@ -929,7 +929,7 @@ static void mndDumpDbCfgInfo(SDbCfgRsp *cfgRsp, SDbObj *pDb) {
cfgRsp->walRetentionSize = pDb->cfg.walRetentionSize; cfgRsp->walRetentionSize = pDb->cfg.walRetentionSize;
cfgRsp->walSegmentSize = pDb->cfg.walSegmentSize; cfgRsp->walSegmentSize = pDb->cfg.walSegmentSize;
cfgRsp->numOfRetensions = pDb->cfg.numOfRetensions; cfgRsp->numOfRetensions = pDb->cfg.numOfRetensions;
cfgRsp->pRetensions = pDb->cfg.pRetensions; cfgRsp->pRetensions = taosArrayDup(pDb->cfg.pRetensions, NULL);
cfgRsp->schemaless = pDb->cfg.schemaless; cfgRsp->schemaless = pDb->cfg.schemaless;
cfgRsp->sstTrigger = pDb->cfg.sstTrigger; cfgRsp->sstTrigger = pDb->cfg.sstTrigger;
} }
@ -972,6 +972,8 @@ static int32_t mndProcessGetDbCfgReq(SRpcMsg *pReq) {
_OVER: _OVER:
tFreeSDbCfgRsp(&cfgRsp);
if (code != 0) { if (code != 0) {
mError("db:%s, failed to get cfg since %s", cfgReq.db, terrstr()); mError("db:%s, failed to get cfg since %s", cfgReq.db, terrstr());
} }