From: wzt.wzt@gmail.com Date: Wed, 10 Nov 2010 03:31:55 +0000 (+0800) Subject: APPARMOR: Fix memory leak of alloc_namespace() X-Git-Tag: v2.6.37-rc2~35^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=246c3fb16b08193837a8009ff15ef6908534ba71;p=pandora-kernel.git APPARMOR: Fix memory leak of alloc_namespace() policy->name is a substring of policy->hname, if prefix is not NULL, it will allocted strlen(prefix) + strlen(name) + 3 bytes to policy->hname in policy_init(). use kzfree(ns->base.name) will casue memory leak if alloc_namespace() failed. Signed-off-by: Zhitong Wang Signed-off-by: John Johansen Signed-off-by: James Morris --- Reading git-diff-tree failed