aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2
diff options
context:
space:
mode:
authorYounger Liu <younger.liu@huawei.com>2013-07-03 18:00:54 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-07-03 19:07:23 -0400
commitd3e3b41b3dffff50c66651d60146b155d6ce0484 (patch)
tree87cefed4f88de18e6825fe582ef015878c855dfa /fs/ocfs2
parent40bd62eb7fb8447798732e809a676ebaf2a7f910 (diff)
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 <younger.liu@huawei.com> Reviewed-by: Jie Liu <jeff.liu@oracle.com> Cc: Joel Becker <jlbec@evilplan.org> Cc: Mark Fasheh <mfasheh@suse.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/ocfs2')
-rw-r--r--fs/ocfs2/cluster/tcp.c3
1 files changed, 3 insertions, 0 deletions
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)
406 sc->sc_node = NULL; 406 sc->sc_node = NULL;
407 407
408 o2net_debug_del_sc(sc); 408 o2net_debug_del_sc(sc);
409
410 if (sc->sc_page)
411 __free_page(sc->sc_page);
409 kfree(sc); 412 kfree(sc);
410} 413}
411 414