]> xenbits.xensource.com Git - libvirt.git/commitdiff
plug two leaks and fix a diagnostic
authorJim Meyering <meyering@redhat.com>
Wed, 5 Nov 2008 14:24:21 +0000 (14:24 +0000)
committerJim Meyering <meyering@redhat.com>
Wed, 5 Nov 2008 14:24:21 +0000 (14:24 +0000)
* src/qemu_conf.c (qemudLoadDriverConfig): Don't leak ->vncListen.
Fix an erroneous copy-and-pasted diagnostic.
* src/qemu_driver.c (qemudShutdown): Don't leak another ->vncListen.

ChangeLog
src/qemu_conf.c
src/qemu_driver.c

index d5926b2d84808590d54e1360bd2525343d90d4ee..723fcafdf2fad5abc2d3e1e037b6aad31a9e6e13 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,12 @@
+Wed Nov  5 15:22:12 CET 2008 Jim Meyering <meyering@redhat.com>
+
+       plug two leaks and fix a diagnostic
+       * src/qemu_conf.c (qemudLoadDriverConfig): Don't leak ->vncListen.
+       Fix an erroneous copy-and-pasted diagnostic.
+       * src/qemu_driver.c (qemudShutdown): Don't leak another ->vncListen.
+
 Wed Nov  5 12:41:00 CET 2008 Chris Lalancette <clalance@redhat.com>
+
        * configure.in, src/storage_backend_logical.c: Call vgscan before
        attempting to scan logical volumes.  This makes sure we've "touched"
        any logical volumes, so they appear in the subsequent "pvs" call.
index 54ac23d2377a3208afa285e05ff1e817e8dd1aad..0e3b9598842f1b3ec1b7543d94927e11f95a8a2b 100644 (file)
@@ -118,9 +118,10 @@ int qemudLoadDriverConfig(struct qemud_driver *driver,
     p = virConfGetValue (conf, "vnc_listen");
     CHECK_TYPE ("vnc_listen", VIR_CONF_STRING);
     if (p && p->str) {
+        VIR_FREE(driver->vncListen);
         if (!(driver->vncListen = strdup(p->str))) {
             qemudReportError(NULL, NULL, NULL, VIR_ERR_NO_MEMORY,
-                             "%s", _("failed to allocate vncTLSx509certdir"));
+                             "%s", _("failed to allocate vnc_listen"));
             virConfFree(conf);
             return -1;
         }
index 4adeb7322cfc96a0d4addbae728a3a4dc52f165e..5d108edc4d30a0d7ed7ccc53211e485d4df31b75 100644 (file)
@@ -314,6 +314,7 @@ qemudShutdown(void) {
     VIR_FREE(qemu_driver->configDir);
     VIR_FREE(qemu_driver->autostartDir);
     VIR_FREE(qemu_driver->vncTLSx509certdir);
+    VIR_FREE(qemu_driver->vncListen);
 
     /* Free domain callback list */
     virDomainEventCallbackListFree(qemu_driver->domainEventCallbacks);