[Pkg-libvirt-commits] [libguestfs] 177/384: launch: libvirt: do not leak the backend string on error

Hilko Bengen bengen at moszumanska.debian.org
Sun Mar 29 16:56:49 UTC 2015


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to branch experimental
in repository libguestfs.

commit cb0c2c33576aa601e308c6bf53b9d989dc6f62fc
Author: Pino Toscano <ptoscano at redhat.com>
Date:   Tue Jan 20 16:23:12 2015 +0100

    launch: libvirt: do not leak the backend string on error
    
    Make sure to free the backend string after using it.
---
 src/launch-libvirt.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/launch-libvirt.c b/src/launch-libvirt.c
index 899742f..6f95e98 100644
--- a/src/launch-libvirt.c
+++ b/src/launch-libvirt.c
@@ -719,6 +719,8 @@ parse_capabilities (guestfs_h *g, const char *capabilities_xml,
    * appliance VM.
    */
   if (!seen_qemu && !seen_kvm) {
+    CLEANUP_FREE char *backend = guestfs_get_backend (g);
+
     error (g,
            _("libvirt hypervisor doesn't support qemu or KVM,\n"
              "so we cannot create the libguestfs appliance.\n"
@@ -730,7 +732,7 @@ parse_capabilities (guestfs_h *g, const char *capabilities_xml,
              "Or: if you want to have libguestfs run qemu directly, try:\n"
              "  export LIBGUESTFS_BACKEND=direct\n"
              "For further help, read the guestfs(3) man page and libguestfs FAQ."),
-           guestfs_get_backend (g));
+           backend);
     return -1;
   }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list