public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfs: fix a memory leak in xfs_get_acl on error
@ 2016-03-30 14:35 Mateusz Guzik
  2016-03-30 20:26 ` Dave Chinner
  2016-03-30 22:13 ` Andreas Gruenbacher
  0 siblings, 2 replies; 6+ messages in thread
From: Mateusz Guzik @ 2016-03-30 14:35 UTC (permalink / raw)
  To: xfs; +Cc: Andreas Gruenbacher, Al Viro

Signed-off-by: Mateusz Guzik <mguzik@redhat.com>
---
 fs/xfs/xfs_acl.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/xfs/xfs_acl.c b/fs/xfs/xfs_acl.c
index 2dad2b5..ce10c4c 100644
--- a/fs/xfs/xfs_acl.c
+++ b/fs/xfs/xfs_acl.c
@@ -162,10 +162,11 @@ xfs_get_acl(struct inode *inode, int type)
 		 */
 		if (error != -ENOATTR)
 			acl = ERR_PTR(error);
-		return acl;
+		goto out;
 	}
 
 	acl = xfs_acl_from_disk(xfs_acl, len, XFS_ACL_MAX_ENTRIES(ip->i_mount));
+out:
 	kmem_free(xfs_acl);
 	return acl;
 }
-- 
1.8.3.1

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-03-30 22:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-30 14:35 [PATCH] xfs: fix a memory leak in xfs_get_acl on error Mateusz Guzik
2016-03-30 20:26 ` Dave Chinner
2016-03-30 20:41   ` Mateusz Guzik
2016-03-30 22:05     ` Dave Chinner
2016-03-30 22:11     ` Andreas Gruenbacher
2016-03-30 22:13 ` Andreas Gruenbacher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox