From: Younger Liu Date: Wed, 3 Jul 2013 22:00:54 +0000 (-0700) Subject: fs/ocfs2/cluster/tcp.c: free sc->sc_page in sc_kref_release() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d3e3b41b3dffff50c66651d60146b155d6ce0484;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git fs/ocfs2/cluster/tcp.c: free sc->sc_page in sc_kref_release() There is a memory leak in sc_kref_release(). When free struct o2net_sock_container (sc), we should release sc->sc_page. Signed-off-by: Younger Liu Reviewed-by: Jie Liu Cc: Joel Becker Cc: Mark Fasheh Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/ocfs2/cluster/tcp.c b/fs/ocfs2/cluster/tcp.c index aa88bd8bcedc..bb9a48bfbd01 100644 --- a/fs/ocfs2/cluster/tcp.c +++ b/fs/ocfs2/cluster/tcp.c @@ -406,6 +406,9 @@ static void sc_kref_release(struct kref *kref) sc->sc_node = NULL; o2net_debug_del_sc(sc); + + if (sc->sc_page) + __free_page(sc->sc_page); kfree(sc); }