From: Alin Serdean Date: Fri, 12 Aug 2016 07:46:40 +0000 (+0000) Subject: stream-windows: Disconnect faulty named pipes X-Git-Tag: v2.12.3~4706 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=f4df0f09c6acc300a35f1ed9cd70fc43dff9b78c;p=mirror_ovs.git stream-windows: Disconnect faulty named pipes Disconnect named pipes that failed connection. Found by testing. Signed-off-by: Alin Gabriel Serdean Signed-off-by: Gurucharan Shetty --- diff --git a/lib/stream-windows.c b/lib/stream-windows.c index e0fe012fb..637920b10 100644 --- a/lib/stream-windows.c +++ b/lib/stream-windows.c @@ -431,6 +431,7 @@ pwindows_accept(struct pstream *pstream, struct stream **new_streamp) } else { VLOG_ERR_RL(&rl, "Could not connect named pipe. Last " "error: %s", ovs_lasterror_to_string()); + DisconnectNamedPipe(p->fd); return EINVAL; } } @@ -446,6 +447,7 @@ pwindows_accept(struct pstream *pstream, struct stream **new_streamp) } else if (last_error != ERROR_PIPE_CONNECTED) { VLOG_ERR_RL(&rl, "Could not connect synchronous named pipe. Last " "error: %s", ovs_lasterror_to_string()); + DisconnectNamedPipe(p->fd); return EINVAL; } else { /* If the pipe is connected, signal an event. */