APPARMOR: Fix memory leak of apparmor_init()
authorwzt.wzt@gmail.com <wzt.wzt@gmail.com>
Wed, 10 Nov 2010 08:05:15 +0000 (16:05 +0800)
committerJames Morris <jmorris@namei.org>
Wed, 10 Nov 2010 20:36:22 +0000 (07:36 +1100)
commita26d279ea87e9fef2cf8a44b371e48e6091975a6
treefe1a1a007c0fc1419e8f8e3e845ad18a377569bc
parent246c3fb16b08193837a8009ff15ef6908534ba71
APPARMOR: Fix memory leak of apparmor_init()

set_init_cxt() allocted sizeof(struct aa_task_cxt) bytes for cxt,
if register_security() failed, it will cause memory leak.

Signed-off-by: Zhitong Wang <zhitong.wangzt@alibaba-inc.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: James Morris <jmorris@namei.org>
security/apparmor/lsm.c