Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0f585f14 authored by OGAWA Hirofumi's avatar OGAWA Hirofumi Committed by Steven Whitehouse
Browse files

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: default avatarOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
parent 066000dd
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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);
}