[Libguestfs] [PATCH 2/2] daemon: fix memory leak in xfs implementation of vfs_minimum_size

Richard W.M. Jones rjones at redhat.com
Fri Mar 10 21:44:30 UTC 2017


On Fri, Mar 10, 2017 at 02:01:17PM +0100, Pino Toscano wrote:
> Use the proper cleanup handler for deleting the guestfs_int_xfsinfo
> struct (so the string fields are deleted too).
> 
> Fixes commit f5caa421d1bb826559ec7a6d98c1a6b6b1f0a629.
> ---
>  daemon/xfs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/daemon/xfs.c b/daemon/xfs.c
> index 7f72e6a..a0d08b2 100644
> --- a/daemon/xfs.c
> +++ b/daemon/xfs.c
> @@ -664,7 +664,7 @@ do_xfs_repair (const char *device,
>  int64_t
>  xfs_minimum_size (const char *path)
>  {
> -  CLEANUP_FREE guestfs_int_xfsinfo *info = do_xfs_info (path);
> +  CLEANUP_FREE_XFSINFO struct guestfs_int_xfsinfo *info = do_xfs_info (path);
>  
>    if (info == NULL)
>      return -1;
> -- 
> 2.9.3

ACK series.

Thanks,

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW




More information about the Libguestfs mailing list