[lxc-devel] [PATCH 1/2] add free conf->rcfile in lxc_conf_free

Weng Meiling wengmeiling.weng at huawei.com
Fri May 3 03:02:40 UTC 2013


when releasing the conf, add free conf->rcfile which is from malloc

Signed-off-by: Weng Meiling <wengmeiling.weng at huawei.com>
---
 src/lxc/conf.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/lxc/conf.c b/src/lxc/conf.c
index 6b3f318..01b70f4 100644
--- a/src/lxc/conf.c
+++ b/src/lxc/conf.c
@@ -3094,6 +3094,8 @@ void lxc_conf_free(struct lxc_conf *conf)
 		free(conf->ttydir);
 	if (conf->fstab)
 		free(conf->fstab);
+	if (conf->rcfile)
+		free(conf->rcfile);
 	lxc_clear_config_network(conf);
 #if HAVE_APPARMOR
 	if (conf->aa_profile)
-- 1.7.1





More information about the lxc-devel mailing list