libxenctrl: Fix xc_interface_close() crash if it gets NULL as an argument

xc_interface_close() crashes if it gets NULL as an argument. However,
it just calls xc_interface_close_common() which is called by many
others functions. It means that they are also vulnerable. So fix above
mentioned issue by adding NULL check in xc_interface_close_common().
This way we fix similar issue in other functions which calls
xc_interface_close_common() too.

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
This commit is contained in:
Daniel Kiper authored and Ian Campbell committed 2013-12-04 14:33:00 +00:00
1 parent 17d34efd67
commit 2cebe22e69
1 file changed
+3
+3
View File
@@ -198,6 +198,9 @@ static int xc_interface_close_common(xc_interface *xch)
{
int rc = 0;
if (!xch)
return 0;
xc__hypercall_buffer_cache_release(xch);
xtl_logger_destroy(xch->dombuild_logger_tofree);
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.