[TD-374] fix invalid read
This commit is contained in:
parent
28d05e3b7d
commit
aa0ec99364
|
@ -130,6 +130,7 @@ static void mgmtVgroupUpdateIdPool(SVgObj *pVgroup) {
|
|||
taosUpdateIdPool(pVgroup->idPool, pDb->cfg.maxTables);
|
||||
int32_t size = sizeof(SChildTableObj *) * pDb->cfg.maxTables;
|
||||
pVgroup->tableList = (SChildTableObj **)realloc(pVgroup->tableList, size);
|
||||
memset(pVgroup->tableList + oldTables, 0, (pDb->cfg.maxTables - oldTables) * sizeof(SChildTableObj **));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -239,6 +239,10 @@ int32_t vnodeOpen(int32_t vnode, char *rootDir) {
|
|||
syncInfo.notifyFileSynced = vnodeNotifyFileSynced;
|
||||
pVnode->sync = syncStart(&syncInfo);
|
||||
|
||||
#ifndef _SYNC
|
||||
pVnode->role = TAOS_SYNC_ROLE_MASTER;
|
||||
#endif
|
||||
|
||||
// start continuous query
|
||||
if (pVnode->role == TAOS_SYNC_ROLE_MASTER)
|
||||
cqStart(pVnode->cq);
|
||||
|
|
Loading…
Reference in New Issue