Chen Hanxiao
2015-Jun-19 02:26 UTC
[Libguestfs] [PATCH] btrfs: fix leak in btrfs_balance_status
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com> --- daemon/btrfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemon/btrfs.c b/daemon/btrfs.c index 050bf18..8b5779a 100644 --- a/daemon/btrfs.c +++ b/daemon/btrfs.c @@ -1688,8 +1688,8 @@ do_btrfs_balance_status (const char *path) size_t i = 0; CLEANUP_FREE char *path_buf = NULL; CLEANUP_FREE char *err = NULL; + CLEANUP_FREE char *out = NULL; CLEANUP_FREE_STRING_LIST char **lines = NULL; - char *out; int r; guestfs_int_btrfsbalance *ret; size_t nlines; -- 2.1.0
Richard W.M. Jones
2015-Jun-19 10:27 UTC
Re: [Libguestfs] [PATCH] btrfs: fix leak in btrfs_balance_status
On Fri, Jun 19, 2015 at 10:26:52AM +0800, Chen Hanxiao wrote:> Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com> > --- > daemon/btrfs.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/daemon/btrfs.c b/daemon/btrfs.c > index 050bf18..8b5779a 100644 > --- a/daemon/btrfs.c > +++ b/daemon/btrfs.c > @@ -1688,8 +1688,8 @@ do_btrfs_balance_status (const char *path) > size_t i = 0; > CLEANUP_FREE char *path_buf = NULL; > CLEANUP_FREE char *err = NULL; > + CLEANUP_FREE char *out = NULL; > CLEANUP_FREE_STRING_LIST char **lines = NULL; > - char *out; > int r; > guestfs_int_btrfsbalance *ret; > size_t nlines; > --Thanks - pushed. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://people.redhat.com/~rjones/virt-df/
Maybe Matching Threads
- [PATCH v4 0/2] add btrfs_balance_status and btrfs_scrub_status
- [PATCH v2] btrfs: use CLEANUP_FREE_STRING_LIST for list free
- [PATCH v3 0/3] btrfs: use CLEANUP_FREE_STRING_LIST for list free
- [PATCH v5 0/2] add btrfs_balance_status and btrfs_scrub_status
- [PATCH v3 0/2] add btrfs_balance_status and btrfs_scrub_status