Index: lxc/src/lxc/conf.c
===================================================================
--- lxc.orig/src/lxc/conf.c	2012-09-04 16:23:11.616585000 -0500
+++ lxc/src/lxc/conf.c	2012-09-05 00:30:09.259928864 -0500
@@ -2465,3 +2465,21 @@
 	}
 	return 0;
 }
+
+void lxc_conf_free(struct lxc_conf *conf)
+{
+	if (!conf)
+		return;
+	if (conf->console.path)
+		free(conf->console.path);
+	if (conf->rootfs.mount != LXCROOTFSMOUNT)
+		free(conf->rootfs.mount);
+	lxc_clear_config_network(conf);
+	if (conf->aa_profile)
+		free(conf->aa_profile);
+	lxc_clear_config_caps(conf);
+	lxc_clear_cgroups(conf, "lxc.cgroup");
+	lxc_clear_hooks(conf);
+	lxc_clear_mount_entries(conf);
+	free(conf);
+}
Index: lxc/src/lxc/conf.h
===================================================================
--- lxc.orig/src/lxc/conf.h	2012-09-04 16:23:11.616585000 -0500
+++ lxc/src/lxc/conf.h	2012-09-05 00:16:49.583958043 -0500
@@ -235,6 +235,7 @@
  * Initialize the lxc configuration structure
  */
 extern struct lxc_conf *lxc_conf_init(void);
+extern void lxc_conf_free(struct lxc_conf *conf);
 
 extern int pin_rootfs(const char *rootfs);
 
Index: lxc/src/lxc/lxccontainer.c
===================================================================
--- lxc.orig/src/lxc/lxccontainer.c	2012-09-04 16:23:11.616585000 -0500
+++ lxc/src/lxc/lxccontainer.c	2012-09-05 00:15:47.991960289 -0500
@@ -215,6 +215,15 @@
 	return ret;
 }
 
+static bool load_config_locked(struct lxc_container *c, char *fname)
+{
+	if (!c->lxc_conf)
+		c->lxc_conf = lxc_conf_init();
+	if (c->lxc_conf && !lxc_config_read(fname, c->lxc_conf))
+		return true;
+	return false;
+}
+
 static bool lxcapi_load_config(struct lxc_container *c, char *alt_file)
 {
 	bool ret = false;
@@ -229,10 +238,7 @@
 		return false;
 	if (lxclock(c->slock, 0))
 		return false;
-	if (!c->lxc_conf)
-		c->lxc_conf = lxc_conf_init();
-	if (c->lxc_conf && !lxc_config_read(fname, c->lxc_conf))
-		ret = true;
+	ret = load_config_locked(c, fname);
 	lxcunlock(c->slock);
 	return ret;
 }
@@ -596,11 +602,18 @@
 		goto out_unlock;
 	}
 
-	if (WEXITSTATUS(status) != 0)
+	if (WEXITSTATUS(status) != 0) {
 		ERROR("container creation template for %s exited with %d\n",
 		      c->name, WEXITSTATUS(status));
-	else
-		bret = true;
+		goto out_unlock;
+	}
+
+	// now clear out the lxc_conf we have, reload from the created
+	// container
+	if (c->lxc_conf)
+		lxc_conf_free(c->lxc_conf);
+	c->lxc_conf = NULL;
+	bret = load_config_locked(c, c->configfile);
 
 out_unlock:
 	lxcunlock(c->slock);
