[PATCH] btrfs: fix memory leakage

2013-10-26 Thread Cong Ding
The memory allocated to "name" by function "extref_get_fields" isn't properly freed when error occurs. Signed-off-by: Cong Ding --- fs/btrfs/tree-log.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 79f057c..e75f3ed 10064

Re: [Kernel-BR] [PATCH] btrfs: Fix memory leakage in the tree-log.c

2013-10-09 Thread Geyslan Gregório Bem
Felipe, thank you, Sending v2. Geyslan Gregório Bem hackingbits.com 2013/10/9 Felipe Pena : > Hi, > > On Wed, Oct 9, 2013 at 8:13 PM, Geyslan G. Bem wrote: >> In some cases, add_inode_ref() is returning without freeing >> the 'name' pointer. >> >> Added bail out to explicitly call kfree when n

Re: [Kernel-BR] [PATCH] btrfs: Fix memory leakage in the tree-log.c

2013-10-09 Thread Felipe Pena
Hi, On Wed, Oct 9, 2013 at 8:13 PM, Geyslan G. Bem wrote: > In some cases, add_inode_ref() is returning without freeing > the 'name' pointer. > > Added bail out to explicitly call kfree when necessary. > > Signed-off-by: Geyslan G. Bem > --- > fs/btrfs/tree-log.c | 13 ++--- > 1 file ch

[PATCH] btrfs: Fix memory leakage in the tree-log.c

2013-10-09 Thread Geyslan G. Bem
In some cases, add_inode_ref() is returning without freeing the 'name' pointer. Added bail out to explicitly call kfree when necessary. Signed-off-by: Geyslan G. Bem --- fs/btrfs/tree-log.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/fs/btrfs/tree-log.c b/