fix:null pointer error
This commit is contained in:
parent
22776e60d5
commit
a17a8cc192
|
@ -509,6 +509,7 @@ SMqSubscribeObj *tCloneSubscribeObj(const SMqSubscribeObj *pSub) {
|
||||||
taosHashPut(pSubNew->consumerHash, &newEp.consumerId, sizeof(int64_t), &newEp, sizeof(SMqConsumerEp));
|
taosHashPut(pSubNew->consumerHash, &newEp.consumerId, sizeof(int64_t), &newEp, sizeof(SMqConsumerEp));
|
||||||
}
|
}
|
||||||
pSubNew->unassignedVgs = taosArrayDup(pSub->unassignedVgs, (__array_item_dup_fn_t)tCloneSMqVgEp);
|
pSubNew->unassignedVgs = taosArrayDup(pSub->unassignedVgs, (__array_item_dup_fn_t)tCloneSMqVgEp);
|
||||||
|
pSubNew->offsetRows = taosArrayDup(pSub->offsetRows, NULL);
|
||||||
memcpy(pSubNew->dbName, pSub->dbName, TSDB_DB_FNAME_LEN);
|
memcpy(pSubNew->dbName, pSub->dbName, TSDB_DB_FNAME_LEN);
|
||||||
pSubNew->qmsg = taosStrdup(pSub->qmsg);
|
pSubNew->qmsg = taosStrdup(pSub->qmsg);
|
||||||
return pSubNew;
|
return pSubNew;
|
||||||
|
|
|
@ -269,7 +269,7 @@ static void doAddNewConsumers(SMqRebOutputObj *pOutput, const SMqRebInputObj *pI
|
||||||
for (int32_t i = 0; i < numOfNewConsumers; i++) {
|
for (int32_t i = 0; i < numOfNewConsumers; i++) {
|
||||||
int64_t consumerId = *(int64_t *)taosArrayGet(pInput->pRebInfo->newConsumers, i);
|
int64_t consumerId = *(int64_t *)taosArrayGet(pInput->pRebInfo->newConsumers, i);
|
||||||
|
|
||||||
SMqConsumerEp newConsumerEp;
|
SMqConsumerEp newConsumerEp = {0};
|
||||||
newConsumerEp.consumerId = consumerId;
|
newConsumerEp.consumerId = consumerId;
|
||||||
newConsumerEp.vgs = taosArrayInit(0, sizeof(void *));
|
newConsumerEp.vgs = taosArrayInit(0, sizeof(void *));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue