fix coredump while a dnode process already exist

This commit is contained in:
Shengliang Guan 2022-03-24 16:44:00 +08:00
parent 1153eac4dc
commit c9d977f9f5
1 changed files with 1 additions and 0 deletions

View File

@ -117,6 +117,7 @@ SDnode *dndCreate(const SDnodeOpt *pOption) {
_OVER: _OVER:
if (code != 0 && pDnode) { if (code != 0 && pDnode) {
dndClearMemory(pDnode); dndClearMemory(pDnode);
pDnode = NULL;
dError("failed to create dnode object since %s", terrstr()); dError("failed to create dnode object since %s", terrstr());
} else { } else {
dInfo("dnode object is created, data:%p", pDnode); dInfo("dnode object is created, data:%p", pDnode);