ext4: fix memory leak in ext4_xattr_set_acl()'s error path
authorEugene Shatokhin <eugene.shatokhin@rosalab.ru>
Thu, 8 Nov 2012 20:11:11 +0000 (15:11 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Jan 2013 16:50:45 +0000 (08:50 -0800)
commitaadee0f004ac85d2afd1cd03279d3dc01363258c
tree6c38d363ee96a88f6851f61cadd2bdb71df9e260
parentaf713fb8e79809aa46f16de4f209245c39b9d7eb
ext4: fix memory leak in ext4_xattr_set_acl()'s error path

commit 24ec19b0ae83a385ad9c55520716da671274b96c upstream.

In ext4_xattr_set_acl(), if ext4_journal_start() returns an error,
posix_acl_release() will not be called for 'acl' which may result in a
memory leak.

This patch fixes that.

Reviewed-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Eugene Shatokhin <eugene.shatokhin@rosalab.ru>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ext4/acl.c