Disconnect named pipes that failed connection.

Found by testing.

Signed-off-by: Alin Gabriel Serdean <aserd...@cloudbasesolutions.com>
---
 lib/stream-windows.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/stream-windows.c b/lib/stream-windows.c
index e0fe012..637920b 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.9.2.windows.1
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to