From 32ead9149223324e0a9d76f32110087eb6372b51 Mon Sep 17 00:00:00 2001 From: Min RK Date: Fri, 23 Aug 2024 20:28:16 +0200 Subject: [PATCH] Problem: create_ipc_wildcard_address can fail check and handle failure --- src/ip.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ip.cpp b/src/ip.cpp index 5016da5bbd..d34aff6c3d 100644 --- a/src/ip.cpp +++ b/src/ip.cpp @@ -565,7 +565,11 @@ int zmq::make_fdpair (fd_t *r_, fd_t *w_) goto try_tcpip; } - create_ipc_wildcard_address (dirname, filename); + rc = create_ipc_wildcard_address (dirname, filename); + if (rc != 0) { + // This may happen if tmpfile creation fails + goto try_tcpip; + } // Initialise the address structure. rc = address.resolve (filename.c_str ());