fix resource leak in vnodeMain.c

[TD-480]
This commit is contained in:
Shuduo Sang 2020-05-31 21:32:26 +08:00
parent 423fa69620
commit 07ecbf693d
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;
} }