From 0ed7a08cd946e0832ac4655b7a76c09ac221f63b 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 5016da5b..1aaf6ad6 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 error_closelistener; + } // Initialise the address structure. rc = address.resolve (filename.c_str ());