launch: don't add a drive twice
authorWanlong Gao <gaowanlong@cn.fujitsu.com>
Mon, 9 Jan 2012 07:22:43 +0000 (15:22 +0800)
committerRichard W.M. Jones <rjones@redhat.com>
Mon, 9 Jan 2012 14:08:26 +0000 (14:08 +0000)
commitbe47b66c3033105a2b880dbc10bfc2b163b7eafe
treec750a6bdc60d981e88dff35428829f7bbb2af186
parent0a7b734d2f54d4e98882532da9887feb66c9824a
launch: don't add a drive twice

1. Change the g->path to restore a absolute path instead of the mixed.
2. Check that if the adding drive is duplicated with the added drive.

Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
RWMJ:

- Make sure abs_path is NULL before it is assigned, so freeing it
  will work along the error path.

- Fix the test which added /dev/null multiple times.
src/launch.c
tests/c-api/test-add-drive-opts.c