libvchan: Fix cleanup when xc_gntshr_open failed
authorMarek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Wed, 26 Jul 2017 21:27:14 +0000 (23:27 +0200)
committerWei Liu <wei.liu2@citrix.com>
Fri, 28 Jul 2017 16:46:14 +0000 (17:46 +0100)
commita3a87d27a3de57ab5591d5d2604e6a5c6c806eab
tree82f8f80baf5d0dc58939780ba3a491162a17ef36
parent49b1ea9e0ea738f245ac372dcd9c9f528bdbb285
libvchan: Fix cleanup when xc_gntshr_open failed

If xc_gntshr_open failed the only thing to cleanup is free allocated
memory. So instead of calling libxenvchan_close (which assume
valid calculated buffers being mmaped already) free memory and return.

Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
tools/libvchan/init.c