Re: [PATCH v2] Btrfs-progs: fix memory leak in open_file_or_dir()

2013-07-14 Thread Wang Shilong
> > > On 14/07/2013 21:58, Wang Shilong wrote: >> Hello Anand and David, >> >> I use the tool valgrind to whether there exists memory leak: >> >> valgrind --tool=memcheck --trace-origins=yes --leak-chek=full btrfs sub >> list /mnt >> There still exists memory leak related to open_file_or_di

Re: [PATCH v2] Btrfs-progs: fix memory leak in open_file_or_dir()

2013-07-14 Thread anand jain
On 14/07/2013 21:58, Wang Shilong wrote: > Hello Anand and David, > > I use the tool valgrind to whether there exists memory leak: > > valgrind --tool=memcheck --trace-origins=yes --leak-chek=full btrfs sub > list /mnt > There still exists memory leak related to open_file_or_dir() (After ap

Re: [PATCH v2] Btrfs-progs: fix memory leak in open_file_or_dir()

2013-07-14 Thread Wang Shilong
Hello Anand and David, I use the tool valgrind to whether there exists memory leak: valgrind --tool=memcheck --trace-origins=yes --leak-chek=full btrfs sub list /mnt There still exists memory leak related to open_file_or_dir() (After applying this patch). I guess it is because we should call

[PATCH v2] Btrfs-progs: fix memory leak in open_file_or_dir()

2013-07-14 Thread Anand Jain
From: Wang Shilong After calling opendir() successfully, closedir() should be also called to free memory. Otherwise, memory leak happens. Signed-off-by: Anand Jain Signed-off-by: Wang Shilong Reviewed-by: Anand Jain --- utils.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-)