提交 0f585f14 编写于 作者: O OGAWA Hirofumi 提交者: Steven Whitehouse

GFS2: Fix refcnt leak on gfs2_follow_link() error path

If ->follow_link handler return the error, it should decrement
nd->path refcnt.

This patch fix it.
Signed-off-by: NOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
上级 066000dd
......@@ -1088,7 +1088,8 @@ static void *gfs2_follow_link(struct dentry *dentry, struct nameidata *nd)
error = vfs_follow_link(nd, buf);
if (buf != array)
kfree(buf);
}
} else
path_put(&nd->path);
return ERR_PTR(error);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册