refactor epset update

This commit is contained in:
yihaoDeng 2022-07-05 21:36:32 +08:00
parent 3d8e6d2e10
commit b6fce4b84f
1 changed files with 4 additions and 4 deletions

View File

@ -1290,16 +1290,16 @@ void doProcessMsgFromServer(SSchedMsg* schedMsg) {
pSendInfo->fp(pSendInfo->param, &buf, pMsg->code); pSendInfo->fp(pSendInfo->param, &buf, pMsg->code);
rpcFreeCont(pMsg->pCont); rpcFreeCont(pMsg->pCont);
destroySendMsgInfo(pSendInfo); destroySendMsgInfo(pSendInfo);
taosMemoryFree(arg); taosMemoryFree(arg);
} }
void processMsgFromServer(void* parent, SRpcMsg* pMsg, SEpSet* pEpSet) { void processMsgFromServer(void* parent, SRpcMsg* pMsg, SEpSet* pEpSet) {
SSchedMsg schedMsg = {0}; SSchedMsg schedMsg = {0};
SEpSet* tEpSet = pEpSet != NULL ? taosMemoryCalloc(1, sizeof(SEpSet)) : NULL; SEpSet* tEpSet = NULL;
if (tEpSet != NULL) { if (pEpSet != NULL) {
*tEpSet = *pEpSet; tEpSet = taosMemoryCalloc(1, sizeof(SEpSet));
memcpy((void*)tEpSet, (void*)pEpSet, sizeof(SEpSet));
} }
SchedArg* arg = taosMemoryCalloc(1, sizeof(SchedArg)); SchedArg* arg = taosMemoryCalloc(1, sizeof(SchedArg));