]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
LXC: Free variable vroot in lxcDomainDetachDeviceHostdevUSBLive()
authorHongwei Bi <hwbi2008@gmail.com>
Mon, 9 Sep 2013 06:05:20 +0000 (14:05 +0800)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 18 Feb 2014 17:37:41 +0000 (17:37 +0000)
The variable vroot should be freed in label cleanup.

(cherry picked from commit 46c9bce4c8b0f2222cc50587ac968ced06eb1eff)

src/lxc/lxc_driver.c

index dfb3f4d262075959150390f3c7809c4821230644..1687329482b5d53a44f747813ce2a9fc8b84a6a7 100644 (file)
@@ -3951,7 +3951,7 @@ lxcDomainDetachDeviceHostdevUSBLive(virLXCDriverPtr driver,
     virDomainHostdevDefPtr def = NULL;
     int idx, ret = -1;
     char *dst = NULL;
-    char *vroot;
+    char *vroot = NULL;
     virUSBDevicePtr usb = NULL;
 
     if ((idx = virDomainHostdevFind(vm->def,
@@ -4011,6 +4011,7 @@ lxcDomainDetachDeviceHostdevUSBLive(virLXCDriverPtr driver,
 cleanup:
     virUSBDeviceFree(usb);
     VIR_FREE(dst);
+    VIR_FREE(vroot);
     return ret;
 }