summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2008-11-21 11:42:51 +0000
committerDaniel P. Berrange <berrange@redhat.com>2008-11-21 11:42:51 +0000
commitc67700be8a284937daff3879e5714d2394dc9cf0 (patch)
treeedcfd735746be6aa4f50ea6dd4a5301bc7e3e266
parentMisc fixes to event registration failure cases (diff)
downloadlibvirt-c67700be8a284937daff3879e5714d2394dc9cf0.tar.gz
libvirt-c67700be8a284937daff3879e5714d2394dc9cf0.tar.bz2
libvirt-c67700be8a284937daff3879e5714d2394dc9cf0.zip
Fix two memory leaks in domain conf and LXC code
-rw-r--r--ChangeLog6
-rw-r--r--src/domain_conf.c2
-rw-r--r--src/lxc_driver.c1
3 files changed, 9 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 84b302bd9..05474cf1d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Fri Nov 21 11:37:14 BST 2008 Daniel P. Berrange <berrange@redhat.com>
+
+ * src/domain_conf.c: Fix two memory leaks in virDomainLoadConfig
+ * src/lxc_driver.c: Fix leak of capabilities object in driver
+ shutdown code
+
Fri Nov 21 10:20:14 BST 2008 Daniel P. Berrange <berrange@redhat.com>
* src/remote_internal.c: Return VIR_NO_SUPPORT if requested
diff --git a/src/domain_conf.c b/src/domain_conf.c
index 39e60d459..414b7ff94 100644
--- a/src/domain_conf.c
+++ b/src/domain_conf.c
@@ -3279,6 +3279,8 @@ virDomainObjPtr virDomainLoadConfig(virConnectPtr conn,
if (notify)
(*notify)(dom, newVM, opaque);
+ VIR_FREE(configFile);
+ VIR_FREE(autostartLink);
return dom;
error:
diff --git a/src/lxc_driver.c b/src/lxc_driver.c
index c4ba24ac7..cebc2ca2f 100644
--- a/src/lxc_driver.c
+++ b/src/lxc_driver.c
@@ -1071,6 +1071,7 @@ static int lxcStartup(void)
static void lxcFreeDriver(lxc_driver_t *driver)
{
+ virCapabilitiesFree(driver->caps);
VIR_FREE(driver->configDir);
VIR_FREE(driver->autostartDir);
VIR_FREE(driver->stateDir);