[PATCH 03/11] UBUNTU: SAUCE: apparmor: fix reference count bug in label_merge_insert()

John Johansen john.johansen at canonical.com
Fri Mar 31 13:25:28 UTC 2017


@new does not have a reference taken locally and should not have its
reference put locally either.

BugLink: http://bugs.launchpad.net/bugs/1660833
Signed-off-by: John Johansen <john.johansen at canonical.com>
Acked-by: Stefan Bader <stefan.bader at canonical.com>
Acked-by: Tim Gardner <tim.gardner at canonical.com>
Acked-by: Brad Figg <brad.figg at canonical.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo at canonical.com>
---
 security/apparmor/label.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/security/apparmor/label.c b/security/apparmor/label.c
index 738fe52..05ac6d6 100644
--- a/security/apparmor/label.c
+++ b/security/apparmor/label.c
@@ -1083,7 +1083,6 @@ static struct aa_label *label_merge_insert(struct aa_label *new,
 		/* TODO: deal with reference labels */
 		if (new->size == 1) {
 			label = aa_get_label(&new->vec[0]->label);
-			aa_put_label(new);
 			return label;
 		}
 	} else if (!stale) {
-- 
2.9.3





More information about the kernel-team mailing list