[Libguestfs] [PATCH v4 3/3] btrfs: use CLEANUP_FREE_STRING_LIST for list free

Chen Hanxiao chenhanxiao at cn.fujitsu.com
Wed Jun 17 08:19:33 UTC 2015


Signed-off-by: Chen Hanxiao <chenhanxiao at cn.fujitsu.com>
---
 daemon/btrfs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/daemon/btrfs.c b/daemon/btrfs.c
index 5361984..88be9ec 100644
--- a/daemon/btrfs.c
+++ b/daemon/btrfs.c
@@ -1692,10 +1692,10 @@ do_btrfs_balance_status (const char *path)
   size_t i = 0;
   CLEANUP_FREE char *path_buf = NULL;
   CLEANUP_FREE char *err = NULL;
+  CLEANUP_FREE_STRING_LIST char **lines = NULL;
   char *out;
   int r;
   guestfs_int_btrfsbalance *ret;
-  char **lines;
   size_t nlines;
   const char *errptr;
   int erroffset;
@@ -1817,10 +1817,10 @@ do_btrfs_scrub_status (const char *path)
   size_t i = 0;
   CLEANUP_FREE char *path_buf = NULL;
   CLEANUP_FREE char *err = NULL;
+  CLEANUP_FREE_STRING_LIST char **lines = NULL;
   char *out;
   int r;
   guestfs_int_btrfsscrub *ret;
-  char **lines;
 
   path_buf = sysroot_path (path);
   if (path_buf == NULL) {
-- 
2.1.0




More information about the Libguestfs mailing list