login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
December
»
16
Re: [PATCH] btrfs: fix memory leak on error path in btrfs_get_acl()
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Mariusz Kozlowski
Subject:
Re: [PATCH] btrfs: fix memory leak on error path in btrfs_get_acl()
Date: Wednesday, December 15, 2010 - 10:56 pm
On Wed, Dec 15, 2010 at 11:49:39PM +0100, Miguel Ojeda wrote:
quoted text
> On Wed, Dec 15, 2010 at 10:57 PM, Mariusz Kozlowski <mk@lab.zgora.pl> wrote: > > If posix_acl_from_xattr() fails we leak memory stored in 'value'. > > > > Signed-off-by: Mariusz Kozlowski <mk@lab.zgora.pl> > > --- > > fs/btrfs/acl.c | 1 + > > 1 files changed, 1 insertions(+), 0 deletions(-) > > > > diff --git a/fs/btrfs/acl.c b/fs/btrfs/acl.c > > index 2222d16..11c9561 100644 > > --- a/fs/btrfs/acl.c > > +++ b/fs/btrfs/acl.c > > @@ -61,6 +61,7 @@ static struct posix_acl *btrfs_get_acl(struct inode *inode, int type) > > if (size > 0) { > > acl = posix_acl_from_xattr(value, size); > > if (IS_ERR(acl)) > > + kfree(value); > > Be careful with the evil { }
Dang. Too much python recently i guess. Will send v2 shortly. Thanks.
quoted text
> > return acl; > > set_cached_acl(inode, type, acl); > > } > > -- > > 1.7.0.4 > > > > -- > > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > > the body of a message to
majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html > > Please read the FAQ at http://www.tux.org/lkml/ > >
-- Mariusz Kozlowski --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH] btrfs: fix memory leak on error path in btrfs_get_ ...
, Mariusz Kozlowski
, (Wed Dec 15, 2:57 pm)
Re: [PATCH] btrfs: fix memory leak on error path in btrfs_ ...
, Miguel Ojeda
, (Wed Dec 15, 3:49 pm)
Re: [PATCH] btrfs: fix memory leak on error path in btrfs_ ...
, Mariusz Kozlowski
, (Wed Dec 15, 10:56 pm)
[PATCH v2] btrfs: fix memory leak on error path in btrfs_g ...
, Mariusz Kozlowski
, (Wed Dec 15, 11:10 pm)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Greg KH
Og dreams of kernels
Jens Axboe
[PATCH 31/33] Fusion: sg chaining support
Arnd Bergmann
Re: finding your own dead "CONFIG_" variables
Mark Brown
[PATCH 2/2] Subject: natsemi: Allow users to disable workaround for DspCfg reset
Tony Breeds
[LGUEST] Look in object dir for .config
git
:
Brian Downing
R