]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 9 Sep 2017 01:26:47 +0000 (18:26 -0700)
commitd4836f68ec17754c2a6ce0d6fc0178308a433dab
tree406e66f717c827dd6c67d9953a9e7bfefb9c9278
parent489e103a19151600202a8d3141550e9122b2b69a
mm/swapfile.c: fix swapon frontswap_map memory leak on error

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>
Cc: <stable@vger.kernel.org> [4.12+]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/swapfile.c