diff --git a/mm/swapfile.c b/mm/swapfile.c
index 12251d386dc76b3ad8db17014086538f80ccf686..bf91dc9e7a791d38b28ab84f10b57892fc0af9dc 100644
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -3291,6 +3291,7 @@ SYSCALL_DEFINE2(swapon, const char __user *, specialfile, int, swap_flags)
 	spin_unlock(&swap_lock);
 	vfree(swap_map);
 	kvfree(cluster_info);
+	kvfree(frontswap_map);
 	if (swap_file) {
 		if (inode && S_ISREG(inode->i_mode)) {
 			inode_unlock(inode);