It's possible for an error in the latter stages of EvtchnOpen() to cause the
channel to be left open in Xen. Also the Mask boolean was not being cleared
which would lead to ASSERTion failures in checked builds.
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Error("fail3\n");
Channel->LocalPort = 0;
+ Channel->Mask = FALSE;
RtlZeroMemory(&Channel->Parameters, sizeof (XENBUS_EVTCHN_PARAMETERS));
+ if (Channel->Type != XENBUS_EVTCHN_TYPE_FIXED)
+ (VOID) EventChannelClose(LocalPort);
+
fail2:
Error("fail2\n");