libs/devicemodel: free xencall handle in error path in _open()
authorWei Liu <wei.liu2@citrix.com>
Mon, 27 Feb 2017 12:20:26 +0000 (12:20 +0000)
committerWei Liu <wei.liu2@citrix.com>
Mon, 27 Feb 2017 16:33:56 +0000 (16:33 +0000)
commitf68c7c618a3ae1ca1971431c48b24ddd10d479c4
tree77146b9ddce516188a2833d67da522118f512b78
parent0003cf2a535d455fb3fd2c03f6ce85fc1a182b6f
libs/devicemodel: free xencall handle in error path in _open()

Change the allocation to use calloc to get zeroed structure. Free
xencall handler in error path.

Spotted by Coverity.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Paul Durrant <paul.durrant@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libs/devicemodel/core.c