From 942c654d1cb556a91b4cca00bd4f0e50d5010a04 Mon Sep 17 00:00:00 2001 From: KIU Shueng Chuan Date: Thu, 27 Dec 2012 21:31:12 +0800 Subject: [PATCH] win32: close zmq-signaler-port-sync event object to avoid handle leak --- src/signaler.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/signaler.cpp b/src/signaler.cpp index b35324cc..fae06e35 100644 --- a/src/signaler.cpp +++ b/src/signaler.cpp @@ -326,6 +326,10 @@ int zmq::signaler_t::make_fdpair (fd_t *r_, fd_t *w_) brc = SetEvent (sync); win_assert (brc != 0); + // Release the kernel object + brc = CloseHandle (sync); + win_assert (brc != 0); + return 0; #elif defined ZMQ_HAVE_OPENVMS