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:30:49 +0000 (09:30 +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 ad4fa49ad1db23a70dfa16751a9c7f8ec006e854..9068369f8a1bc18b49e346bea2959473a078dbf4 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;
 }