diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-11-12 08:00:25 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-11-12 08:00:25 -0800 |
commit | fe7e96f66b2622d8492ee9dd7fc08b811086caca (patch) | |
tree | 524b78f3a5a9c35bee8b437e9c4738d42fc454a7 /security/apparmor/lsm.c | |
parent | 0f90933c477c061df6daf42d814ff2012aea43cc (diff) | |
parent | a26d279ea87e9fef2cf8a44b371e48e6091975a6 (diff) | |
download | op-kernel-dev-fe7e96f66b2622d8492ee9dd7fc08b811086caca.zip op-kernel-dev-fe7e96f66b2622d8492ee9dd7fc08b811086caca.tar.gz |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6:
APPARMOR: Fix memory leak of apparmor_init()
APPARMOR: Fix memory leak of alloc_namespace()
Diffstat (limited to 'security/apparmor/lsm.c')
-rw-r--r-- | security/apparmor/lsm.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c index cf1de44..b7106f1 100644 --- a/security/apparmor/lsm.c +++ b/security/apparmor/lsm.c @@ -922,7 +922,7 @@ static int __init apparmor_init(void) error = register_security(&apparmor_ops); if (error) { AA_ERROR("Unable to register AppArmor\n"); - goto register_security_out; + goto set_init_cxt_out; } /* Report that AppArmor successfully initialized */ @@ -936,6 +936,9 @@ static int __init apparmor_init(void) return error; +set_init_cxt_out: + aa_free_task_context(current->real_cred->security); + register_security_out: aa_free_root_ns(); @@ -944,7 +947,6 @@ alloc_out: apparmor_enabled = 0; return error; - } security_initcall(apparmor_init); |