From d9c80b361fd3cd7bd1aca01590759e8db1935a3a Mon Sep 17 00:00:00 2001 From: "wzt.wzt@gmail.com" Date: Wed, 10 Nov 2010 16:05:15 +0800 Subject: [PATCH] --- yaml --- r: 221749 b: refs/heads/master c: a26d279ea87e9fef2cf8a44b371e48e6091975a6 h: refs/heads/master i: 221747: a8cc2edfe95a412510f8fb0a03dca03d4af3d466 v: v3 --- [refs] | 2 +- trunk/security/apparmor/lsm.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index af56a0b265bf..413a448c3833 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 246c3fb16b08193837a8009ff15ef6908534ba71 +refs/heads/master: a26d279ea87e9fef2cf8a44b371e48e6091975a6 diff --git a/trunk/security/apparmor/lsm.c b/trunk/security/apparmor/lsm.c index cf1de4462ccd..b7106f192b75 100644 --- a/trunk/security/apparmor/lsm.c +++ b/trunk/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 @@ static int __init apparmor_init(void) apparmor_enabled = 0; return error; - } security_initcall(apparmor_init);