Merge pull request #1652 from taosdata/enhance/sdbWal
potential memory leak if no any wal files
This commit is contained in:
commit
728881a003
|
@ -208,6 +208,8 @@ int walRestore(void *handle, void *pVnode, int (*writeFp)(void *, void *, int))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
closedir(dir);
|
||||||
|
|
||||||
if (count == 0) {
|
if (count == 0) {
|
||||||
if (pWal->keep) code = walRenew(pWal);
|
if (pWal->keep) code = walRenew(pWal);
|
||||||
return code;
|
return code;
|
||||||
|
@ -248,8 +250,6 @@ int walRestore(void *handle, void *pVnode, int (*writeFp)(void *, void *, int))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
closedir(dir);
|
|
||||||
|
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue