fix:[TD-33606]coder is uninilized if error happens in middle

This commit is contained in:
wangmm0220 2025-01-24 15:55:17 +08:00
parent bc0570f9ad
commit 79dbf09131
1 changed files with 3 additions and 3 deletions

View File

@ -383,7 +383,7 @@ static void processCreateStb(SMqMetaRsp* metaRsp, cJSON** pJson) {
return;
}
SVCreateStbReq req = {0};
SDecoder coder;
SDecoder coder = {0};
uDebug("create stable data:%p", metaRsp);
// decode and process req
@ -1020,7 +1020,7 @@ static int32_t taosCreateStb(TAOS* taos, void* meta, uint32_t metaLen) {
return TSDB_CODE_INVALID_PARA;
}
SVCreateStbReq req = {0};
SDecoder coder;
SDecoder coder = {0};
SMCreateStbReq pReq = {0};
int32_t code = TSDB_CODE_SUCCESS;
SRequestObj* pRequest = NULL;
@ -2327,7 +2327,7 @@ static void processBatchMetaToJson(SMqBatchMetaRsp* pMsgRsp, char** string) {
uError("invalid parameter in %s", __func__);
return;
}
SDecoder coder;
SDecoder coder = {0};
SMqBatchMetaRsp rsp = {0};
int32_t code = 0;
cJSON* pJson = NULL;