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

Hilko Bengen bengen at moszumanska.debian.org
Sun Mar 29 17:01:19 UTC 2015


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

bengen pushed a commit to branch master
in repository libguestfs.

commit ef8cee16e292e4d32f035f720167d39322caecdf
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.
    
    (cherry picked from commit cb0c2c33576aa601e308c6bf53b9d989dc6f62fc)
---
 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 ea0502f..e8a6098 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