From c17d1cfebc016ed790df74f0eeb539a4a71fadda Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Mon, 25 Aug 2025 06:56:09 -0700 Subject: fixes #2148 Old id_reg_map seems not be freed This simplifies the code to just use a precompiled static list. This should be lighter weight, and provably free from leaks. --- src/core/pipe.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/core/pipe.c') diff --git a/src/core/pipe.c b/src/core/pipe.c index 94520c39..bfc272b3 100644 --- a/src/core/pipe.c +++ b/src/core/pipe.c @@ -9,8 +9,8 @@ // found online at https://opensource.org/licenses/MIT. // -#include "core/nng_impl.h" #include "nng/nng.h" +#include "nng_impl.h" #include "sockimpl.h" #include @@ -20,9 +20,8 @@ // Operations on pipes (to the transport) are generally blocking operations, // performed in the context of the protocol. -static nni_id_map pipes = - NNI_ID_MAP_INITIALIZER(1, 0x7fffffff, NNI_ID_FLAG_RANDOM); -static nni_mtx pipes_lk = NNI_MTX_INITIALIZER; +static nni_id_map pipes = NNI_ID_MAP_INITIALIZER(1, 0x7fffffff, true); +static nni_mtx pipes_lk = NNI_MTX_INITIALIZER; static void pipe_destroy(void *); static void pipe_reap(void *); -- cgit v1.2.3-70-g09d2