From f4df0f09c6acc300a35f1ed9cd70fc43dff9b78c Mon Sep 17 00:00:00 2001 From: Alin Serdean Date: Fri, 12 Aug 2016 07:46:40 +0000 Subject: [PATCH] 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 --- lib/stream-windows.c | 2 ++ 1 file changed, 2 insertions(+) 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. */ -- 2.39.5