On Friday 12 June 2015 11:27:22 Chen Hanxiao wrote: > As Pino's comment, we should take advantage of > macro CLEANUP_FREE_STRING_LIST. > > Signed-off-by: Chen Hanxiao <[email protected]> > --- > daemon/btrfs.c | 12 ++++-------- > 1 file changed, 4 insertions(+), 8 deletions(-) > > diff --git a/daemon/btrfs.c b/daemon/btrfs.c > index 39392f7..fd93d43 100644 > --- a/daemon/btrfs.c > +++ b/daemon/btrfs.c > @@ -409,7 +409,7 @@ umount (char *fs_buf, const mountable_t *fs) > guestfs_int_btrfssubvolume_list * > do_btrfs_subvolume_list (const mountable_t *fs) > { > - char **lines; > + CLEANUP_FREE_STRING_LIST char **lines;
Usually, pointer variables marked as CLEANUP_* need to be reset, otherwise the cleanup routine will try to free uninitialized memory. Thanks, -- Pino Toscano _______________________________________________ Libguestfs mailing list [email protected] https://www.redhat.com/mailman/listinfo/libguestfs
