Browse Source

[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 <geraldsc@de.ibm.com>
Acked-by:  Stephen Smalley <sds@epoch.ncsc.mil>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Gerald Schaefer 20 years ago
parent
commit
da3caa204c
1 changed files with 1 additions and 0 deletions
  1. 1 0
      security/selinux/hooks.c

+ 1 - 0
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;
 }