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.
This commit is contained in:
Jim Meyering 2008-11-05 14:24:21 +00:00
parent 1ac47e34f2
commit 7271a92bec
3 changed files with 11 additions and 1 deletions

View File

@ -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.

View 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;
}

View 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);