potential memory leak if no any wal files

This commit is contained in:
jtao1735 2020-04-18 12:35:12 +00:00
parent a8343afdb8
commit 3640f93287
1 changed files with 2 additions and 2 deletions

View File

@ -208,6 +208,8 @@ int walRestore(void *handle, void *pVnode, int (*writeFp)(void *, void *, int))
}
}
closedir(dir);
if (count == 0) {
if (pWal->keep) code = walRenew(pWal);
return code;
@ -248,8 +250,6 @@ int walRestore(void *handle, void *pVnode, int (*writeFp)(void *, void *, int))
}
}
closedir(dir);
return code;
}