Merge pull request #2086 from taosdata/hotfix/sangshuduo/fix-resource-leak-in-vnodeMain.c

fix resource leak in vnodeMain.c
This commit is contained in:
Shengliang Guan 2020-06-01 09:43:11 +08:00 committed by GitHub
commit 9fefe5ac62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -552,6 +552,7 @@ static int32_t vnodeReadCfg(SVnodeObj *pVnode) {
int len = fread(content, 1, maxLen, fp); int len = fread(content, 1, maxLen, fp);
if (len <= 0) { if (len <= 0) {
vError("vgId:%d, failed to read vnode cfg, content is null", pVnode->vgId); vError("vgId:%d, failed to read vnode cfg, content is null", pVnode->vgId);
free(content);
return errno; return errno;
} }