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:
commit
9fefe5ac62
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue