fix: client mem leak
This commit is contained in:
parent
73662b3058
commit
d2fc6215c6
|
@ -709,6 +709,7 @@ void tmqSendHbReq(void* param, void* tmrId) {
|
|||
int64_t refId = *(int64_t*)param;
|
||||
tmq_t* tmq = taosAcquireRef(tmqMgmt.rsetId, refId);
|
||||
if (tmq == NULL) {
|
||||
taosMemoryFree(param);
|
||||
return;
|
||||
}
|
||||
int64_t consumerId = tmq->consumerId;
|
||||
|
@ -939,10 +940,9 @@ tmq_t* tmq_consumer_new(tmq_conf_t* conf, char* errstr, int32_t errstrLen) {
|
|||
return NULL;
|
||||
}
|
||||
|
||||
if (pTmq->hbBgEnable) {
|
||||
int64_t* pRefId = taosMemoryMalloc(sizeof(int64_t));
|
||||
*pRefId = pTmq->refId;
|
||||
|
||||
if (pTmq->hbBgEnable) {
|
||||
pTmq->hbLiveTimer = taosTmrStart(tmqSendHbReq, 1000, pRefId, tmqMgmt.timer);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue