[PATCH remote-viewer] Fix potential file descriptor leaks found by Coverity.

Daniel P. Berrangé berrange at redhat.com
Wed Apr 1 08:31:18 UTC 2020


On Wed, Apr 01, 2020 at 09:25:18AM +0200, Julien Ropé wrote:
> The error code returned by virt_viewer_session_open_fd() and virt_viewer_session_channel_open_fd() were not checked. The file descriptor passed to them could then be left opened even if the function failed, causing a leak of resources.
> 
> This was reported by a Coverity scan, logged under https://bugzilla.redhat.com/show_bug.cgi?id=1655792
> 
> Signed-off-by: Julien Ropé <jrope at redhat.com>
> ---
>  src/virt-viewer-app.c | 11 +++++++++--
>  1 file changed, 9 insertions(+), 2 deletions(-)

Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




More information about the virt-tools-list mailing list