[Libguestfs] [PATCH v2] btrfs: use CLEANUP_FREE_STRING_LIST for list free
Pino Toscano
ptoscano at redhat.com
Fri Jun 12 11:41:34 UTC 2015
On Friday 12 June 2015 17:24:59 Chen Hanxiao wrote:
> As Pino's comment, we should take advantage of
> macro CLEANUP_FREE_STRING_LIST.
>
> Signed-off-by: Chen Hanxiao <chenhanxiao at cn.fujitsu.com>
> ---
> [...]
> @@ -1253,8 +1251,8 @@ do_btrfs_qgroup_show (const char *path)
> CLEANUP_FREE char *path_buf = NULL;
> CLEANUP_FREE char *err = NULL;
> CLEANUP_FREE char *out = NULL;
> + CLEANUP_FREE_STRING_LIST char **lines = NULL;
> int r;
> - char **lines;
>
> path_buf = sysroot_path (path);
> if (path_buf == NULL) {
This change causes the daemon to crash, because currently the line
buffers are used as return values. Also,
tests/btrfs/test-btrfs-subvolume-default.pl hangs.
Please make sure that all the tests (`make check`) pass.
--
Pino Toscano
More information about the Libguestfs
mailing list