From c67700be8a284937daff3879e5714d2394dc9cf0 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Fri, 21 Nov 2008 11:42:51 +0000 Subject: [PATCH] Fix two memory leaks in domain conf and LXC code --- ChangeLog | 6 ++++++ src/domain_conf.c | 2 ++ src/lxc_driver.c | 1 + 3 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index 84b302bd9f..05474cf1d0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Fri Nov 21 11:37:14 BST 2008 Daniel P. Berrange + + * 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 * src/remote_internal.c: Return VIR_NO_SUPPORT if requested diff --git a/src/domain_conf.c b/src/domain_conf.c index 39e60d4597..414b7ff944 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 c4ba24ac70..cebc2ca2fe 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);