]> 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)
committerJán Tomko <jtomko@redhat.com>
Mon, 9 Sep 2013 08:40:13 +0000 (10:40 +0200)
The variable vroot should be freed in label cleanup.

src/lxc/lxc_driver.c

index 9cb95ff9704c582b39988eee3df41d247a4066eb..b587c222d789b13721db86887994031c53d3b716 100644 (file)
@@ -3766,7 +3766,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,
@@ -3824,6 +3824,7 @@ lxcDomainDetachDeviceHostdevUSBLive(virLXCDriverPtr driver,
 cleanup:
     virUSBDeviceFree(usb);
     VIR_FREE(dst);
+    VIR_FREE(vroot);
     return ret;
 }