Problem: create_ipc_wildcard_address can fail

check and handle failure
This commit is contained in:
Min RK 2024-08-23 20:28:16 +02:00 committed by Luca Boccassi
parent 5f408ba371
commit 0ed7a08cd9

View File

@ -565,7 +565,11 @@ int zmq::make_fdpair (fd_t *r_, fd_t *w_)
goto try_tcpip; 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. // Initialise the address structure.
rc = address.resolve (filename.c_str ()); rc = address.resolve (filename.c_str ());