Re: [PATCH] API: Tweak virDomainOpenGraphics to return fd directly

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

 



On Tue, Aug 26, 2014 at 16:05:44 -0600, Eric Blake wrote:
> Let's fix this before we bake in a painful API.  Since we know
> that we have exactly one non-negative fd on success, we might
> as well return the fd directly instead of forcing the user to
> pass in a pointer.  Fix a memory leak I found while reviewing.
> 
> * include/libvirt/libvirt.h.in (virDomainOpenGraphicsFD): Drop
> unneeded parameter.
> * src/driver.h (virDrvDomainOpenGraphicsFD): Likewise.
> * src/libvirt.c (virDomainOpenGraphicsFD): Adjust interface to
> return fd directly.
> * daemon/remote.c (remoteDispatchDomainOpenGraphicsFd): Adjust
> semantics.
> * src/qemu/qemu_driver.c (qemuDomainOpenGraphicsFD): Likewise.
> * src/remote/remote_driver.c (remoteDomainOpenGraphicsFD):
> Likewise, and plug memory leak.
> 
> Signed-off-by: Eric Blake <eblake@xxxxxxxxxx>
> ---
>  daemon/remote.c              |  9 +++++----
>  include/libvirt/libvirt.h.in |  1 -
>  src/driver.h                 |  1 -
>  src/libvirt.c                | 14 ++++++--------
>  src/qemu/qemu_driver.c       |  3 +--
>  src/remote/remote_driver.c   | 17 +++++++++++------
>  6 files changed, 23 insertions(+), 22 deletions(-)

Makes sense. ACK.

Jirka

--
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]