]> git.hungrycats.org Git - linux/commitdiff
apparmor: fix ref count leak when profile sha1 hash is read
authorJohn Johansen <john.johansen@canonical.com>
Wed, 18 Nov 2015 19:41:05 +0000 (11:41 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 16 Aug 2016 07:29:02 +0000 (09:29 +0200)
commit 0b938a2e2cf0b0a2c8bac9769111545aff0fee97 upstream.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Seth Arnold <seth.arnold@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
security/apparmor/apparmorfs.c

index 7db9954f1af2c56c42400746f367f5f4d9906ca8..b30489856741d1d9bc78d9cb74439a88c18778f8 100644 (file)
@@ -331,6 +331,7 @@ static int aa_fs_seq_hash_show(struct seq_file *seq, void *v)
                        seq_printf(seq, "%.2x", profile->hash[i]);
                seq_puts(seq, "\n");
        }
+       aa_put_profile(profile);
 
        return 0;
 }