]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - mm/swapfile.c
mm/swapfile.c: fix swapon frontswap_map memory leak on error
authorDavid Rientjes <rientjes@google.com>
Fri, 8 Sep 2017 23:13:29 +0000 (16:13 -0700)
committerSeth Forshee <seth.forshee@canonical.com>
Fri, 15 Sep 2017 16:15:08 +0000 (09:15 -0700)
commit7fbcc0eb897930b15b66a00d57189c9a8a82f008
treea284316014a702fbaf34934ed252cd79253bcb3f
parente3692d25af6933198cd5fc4f94262b6eb9378d83
mm/swapfile.c: fix swapon frontswap_map memory leak on error

BugLink: http://bugs.launchpad.net/bugs/1717549
commit b6b1fd2a6bedd533aeed83924d7be0e944fded9f upstream.

Free frontswap_map if an error is encountered before enable_swap_info().

Signed-off-by: David Rientjes <rientjes@google.com>
Reviewed-by: "Huang, Ying" <ying.huang@intel.com>
Cc: Darrick J. Wong <darrick.wong@oracle.com>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
mm/swapfile.c