libcontainer: Only use config in start

Only using the config from container_start means that the caller doesn't
have to save it.  Now the only parts needed after start are saved to
struct container and no requirements are placed on the caller to
preserve the configuration struct after starting the container.

BUG=none
TEST=Start and stop containers on minnie, libcontainer UT passes.

Change-Id: Ibafa284e38c0c4cf09aa2d52d51e8dc8350b0678
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/341841
Reviewed-by: Eric Caruso <ejcaruso@chromium.org>
diff --git a/libcontainer/libcontainer_unittest.c b/libcontainer/libcontainer_unittest.c
index 40db4e3..d3baa6f 100644
--- a/libcontainer/libcontainer_unittest.c
+++ b/libcontainer/libcontainer_unittest.c
@@ -216,7 +216,7 @@
 				    0);
 
 	rundir = mkdtemp(rundir_template);
-	self->container = container_new("containerUT", rundir, self->config);
+	self->container = container_new("containerUT", rundir);
 	ASSERT_NE(NULL, self->container);
 }
 
@@ -243,7 +243,7 @@
 {
 	char *path;
 
-	EXPECT_EQ(0, container_start(self->container));
+	EXPECT_EQ(0, container_start(self->container, self->config));
 	EXPECT_EQ(2, mount_called);
 	EXPECT_EQ(0, strcmp(mount_call_args[1].source, "tmpfs"));
 	EXPECT_LT(0, asprintf(&path, "%s/root/tmp", mkdtemp_root));
@@ -293,7 +293,7 @@
 
 TEST_F(container_test, test_kill_container)
 {
-	EXPECT_EQ(0, container_start(self->container));
+	EXPECT_EQ(0, container_start(self->container, self->config));
 	EXPECT_EQ(0, container_kill(self->container));
 	EXPECT_EQ(1, kill_called);
 	EXPECT_EQ(SIGKILL, kill_sig);