summaryrefslogtreecommitdiff
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorJohn Johansen <john.johansen@canonical.com>2026-10-20 16:00:30 -0700
committerJohn Johansen <john.johansen@canonical.com>2026-10-29 08:28:03 -0700
commit33ed50716251d5b2875706c40d0c8082d46be0b1 (patch)
tree78085f30b09b664755ff0b44487ac42cdcc3a311 /scripts/Makefile.thinlto
parent4890a8b1a9df880dd188adb8b8e8fab107ad69d9 (diff)
downloadlinux-33ed50716251d5b2875706c40d0c8082d46be0b1.tar.gz
linux-33ed50716251d5b2875706c40d0c8082d46be0b1.zip
apparmor: fix refcount leak in aa_get_newest_profile()
The labels_profile() macro is evaluating its argument twice #define labels_profile(X) ((X)->vec[(X)->size - 1]) unfortunately aa_get_newest_profile() passes aa_get_newest_label(&p->label) so every call to aa_get_newest_profile results in 2 refcounts being taken with one being leaked. There is no need for labels_profile() to be a macro. Convert it to an inline fn, which ensures all uses are passing the correct struct and removes the double evaluation. Fixes: 637f688dc3dc ("apparmor: switch from profiles to using labels on contexts") Cc: stable@vger.kernel.org Reported-by: Georgia Garcia <georgia.garcia@canonical.com> Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions