Merge pull request #25985 from taosdata/fix/TD-30249-3.0
fix: memory leak
This commit is contained in:
commit
6643285699
|
@ -5616,18 +5616,36 @@ int32_t tSerializeSVKillCompactReq(void *buf, int32_t bufLen, SVKillCompactReq *
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t tDeserializeSVKillCompactReq(void *buf, int32_t bufLen, SVKillCompactReq *pReq) {
|
int32_t tDeserializeSVKillCompactReq(void *buf, int32_t bufLen, SVKillCompactReq *pReq) {
|
||||||
|
int32_t code = 0;
|
||||||
SDecoder decoder = {0};
|
SDecoder decoder = {0};
|
||||||
|
|
||||||
tDecoderInit(&decoder, buf, bufLen);
|
tDecoderInit(&decoder, buf, bufLen);
|
||||||
|
|
||||||
if (tStartDecode(&decoder) < 0) return -1;
|
if (tStartDecode(&decoder) < 0) {
|
||||||
|
code = TSDB_CODE_MSG_DECODE_ERROR;
|
||||||
|
goto _exit;
|
||||||
|
}
|
||||||
|
|
||||||
if (tDecodeI32(&decoder, &pReq->compactId) < 0) return -1;
|
if (tDecodeI32(&decoder, &pReq->compactId) < 0) {
|
||||||
if (tDecodeI32(&decoder, &pReq->vgId) < 0) return -1;
|
code = TSDB_CODE_MSG_DECODE_ERROR;
|
||||||
if (tDecodeI32(&decoder, &pReq->dnodeId) < 0) return -1;
|
goto _exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (tDecodeI32(&decoder, &pReq->vgId) < 0) {
|
||||||
|
code = TSDB_CODE_MSG_DECODE_ERROR;
|
||||||
|
goto _exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (tDecodeI32(&decoder, &pReq->dnodeId) < 0) {
|
||||||
|
code = TSDB_CODE_MSG_DECODE_ERROR;
|
||||||
|
goto _exit;
|
||||||
|
}
|
||||||
|
|
||||||
tEndDecode(&decoder);
|
tEndDecode(&decoder);
|
||||||
|
|
||||||
|
_exit:
|
||||||
tDecoderClear(&decoder);
|
tDecoderClear(&decoder);
|
||||||
return 0;
|
return code;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t tSerializeSAlterVnodeConfigReq(void *buf, int32_t bufLen, SAlterVnodeConfigReq *pReq) {
|
int32_t tSerializeSAlterVnodeConfigReq(void *buf, int32_t bufLen, SAlterVnodeConfigReq *pReq) {
|
||||||
|
|
Loading…
Reference in New Issue