fix invalid free
This commit is contained in:
parent
26ea125f03
commit
31b6d15240
|
@ -892,11 +892,14 @@ int32_t schCloneCallbackParam(SSchCallbackParamHeader *pSrc, SSchCallbackParamHe
|
|||
int32_t schCloneSMsgSendInfo(void *src, void **dst) {
|
||||
SMsgSendInfo *pSrc = src;
|
||||
int32_t code = 0;
|
||||
SMsgSendInfo *pDst = taosMemoryMalloc(sizeof(*pSrc));
|
||||
SMsgSendInfo *pDst = taosMemoryCalloc(1, sizeof(*pSrc));
|
||||
if (NULL == pDst) {
|
||||
qError("malloc SMsgSendInfo for rpcCtx failed, len:%d", (int32_t)sizeof(*pSrc));
|
||||
SCH_ERR_RET(TSDB_CODE_OUT_OF_MEMORY);
|
||||
}
|
||||
if (pDst->target.dbFName != NULL) {
|
||||
pDst->target.dbFName = taosStrdup(pSrc->target.dbFName);
|
||||
}
|
||||
|
||||
memcpy(pDst, pSrc, sizeof(*pSrc));
|
||||
pDst->param = NULL;
|
||||
|
|
Loading…
Reference in New Issue