Commit 70991acb authored by John Johansen's avatar John Johansen Committed by Tim Gardner

UBUNTU: SAUCE: apparmor: Fix: refcount bug when inserting label update that transitions ns

We already have a refcount on l, and aa_label_insert() returns another
refcount so we need to make sure to put the extra one.
Signed-off-by: default avatarJohn Johansen <john.johansen@canonical.com>
Signed-off-by: default avatarTim Gardner <tim.gardner@canonical.com>
parent c7242366
......@@ -1875,7 +1875,8 @@ static struct aa_label *__label_update(struct aa_label *label)
if (tmp != l) {
aa_put_label(l);
l = tmp;
}
} else
aa_put_label(l); /* extra ref */
return l;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment