fix mem leak at walFindCurMetaVer
This commit is contained in:
parent
bed1a673b4
commit
6370e5b782
|
@ -937,6 +937,7 @@ static int walFindCurMetaVer(SWal* pWal) {
|
||||||
TdDirPtr pDir = taosOpenDir(pWal->path);
|
TdDirPtr pDir = taosOpenDir(pWal->path);
|
||||||
if (pDir == NULL) {
|
if (pDir == NULL) {
|
||||||
wError("vgId:%d, path:%s, failed to open since %s", pWal->cfg.vgId, pWal->path, tstrerror(terrno));
|
wError("vgId:%d, path:%s, failed to open since %s", pWal->cfg.vgId, pWal->path, tstrerror(terrno));
|
||||||
|
regfree(&walMetaRegexPattern);
|
||||||
return terrno;
|
return terrno;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -956,6 +957,7 @@ static int walFindCurMetaVer(SWal* pWal) {
|
||||||
}
|
}
|
||||||
if (taosCloseDir(&pDir) != 0) {
|
if (taosCloseDir(&pDir) != 0) {
|
||||||
wError("failed to close dir, ret:%s", tstrerror(terrno));
|
wError("failed to close dir, ret:%s", tstrerror(terrno));
|
||||||
|
regfree(&walMetaRegexPattern);
|
||||||
return terrno;
|
return terrno;
|
||||||
}
|
}
|
||||||
regfree(&walMetaRegexPattern);
|
regfree(&walMetaRegexPattern);
|
||||||
|
|
Loading…
Reference in New Issue