fix invalid free
This commit is contained in:
parent
e6a0834315
commit
f34013a06e
|
@ -101,7 +101,9 @@ int32_t dndWriteMsgToWorker(SDnodeWorker *pWorker, void *pCont, int32_t contLen)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (taosWriteQitem(pWorker->queue, pMsg) != 0) {
|
if (taosWriteQitem(pWorker->queue, pMsg) != 0) {
|
||||||
taosFreeQitem(pMsg);
|
if (contLen != 0) {
|
||||||
|
taosFreeQitem(pMsg);
|
||||||
|
}
|
||||||
terrno = TSDB_CODE_OUT_OF_MEMORY;
|
terrno = TSDB_CODE_OUT_OF_MEMORY;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue