Re: [PATCH v5 1/5] qemuBuildChrDeviceCommandLine: Don't leak devstr

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jul 12, 2013 at 07:23:58PM +0200, Michal Privoznik wrote:
> It's caller's responsibility to free return value of
> qemuBuildChrDeviceStr().
> ---
>  src/qemu/qemu_command.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
> index 0e517f2..d6ef9cd 100644
> --- a/src/qemu/qemu_command.c
> +++ b/src/qemu/qemu_command.c
> @@ -6608,6 +6608,7 @@ qemuBuildChrDeviceCommandLine(virCommandPtr cmd,
>          return -1;
>  
>      virCommandAddArgList(cmd, "-device", devstr, NULL);
> +    VIR_FREE(devstr);
>      return 0;
>  }

ACK,  When was this leak introduced ? Or rather, does this need to
go in any -maint branch.

Daniel
--
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]