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)
committerJohn Johansen <john.johansen@canonical.com>
Tue, 12 Jul 2016 15:43:10 +0000 (08:43 -0700)
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Seth Arnold <seth.arnold@canonical.com>
security/apparmor/apparmorfs.c

index 45a6199..0d8dd71 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;
 }