Merge pull request #1652 from taosdata/enhance/sdbWal

potential memory leak if no any wal files
This commit is contained in:
slguan 2020-04-18 21:49:22 +08:00 committed by GitHub
commit 728881a003
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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;
}