Commit
89d55473ed16543044a31d1e0d4660cf5a3f49df "xentoolcore_restrict_all:
Implement for libxenevtchn" added a call to register allowing to
restrict the event channel.
However, the call to deregister the handler was not performed if open
failed or when closing the event channel. This will result to corrupt
the list of handlers and potentially crash the application later one.
Fix it by calling xentoolcore_deregister_active_handle on failure and
closure.
Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Release-acked-by: Julien Grall <julien.grall@linaro.org>
err:
osdep_evtchn_close(xce);
+ xentoolcore__deregister_active_handle(&xce->tc_ah);
xtl_logger_destroy(xce->logger_tofree);
free(xce);
return NULL;
return 0;
rc = osdep_evtchn_close(xce);
+ xentoolcore__deregister_active_handle(&xce->tc_ah);
xtl_logger_destroy(xce->logger_tofree);
free(xce);
return rc;