From: Gerald Schaefer Date: Wed, 22 Jun 2005 00:15:18 +0000 (-0700) Subject: [PATCH] SELinux: memory leak in selinux_sb_copy_data() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=da3caa204ca40c32dcb751ebead2a6835b83e8d1;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git [PATCH] SELinux: memory leak in selinux_sb_copy_data() There is a memory leak during mount when SELinux is active and mount options are specified. Signed-off-by: Gerald Schaefer Acked-by: Stephen Smalley Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index db845cbd584..87302a49067 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c @@ -1945,6 +1945,7 @@ static int selinux_sb_copy_data(struct file_system_type *type, void *orig, void } while (*in_end++); copy_page(in_save, nosec_save); + free_page((unsigned long)nosec_save); out: return rc; }