Skip to content

Commit 32ead91

Browse files
committed
Problem: create_ipc_wildcard_address can fail
check and handle failure
1 parent 2a75ef0 commit 32ead91

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/ip.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,11 @@ int zmq::make_fdpair (fd_t *r_, fd_t *w_)
565565
goto try_tcpip;
566566
}
567567

568-
create_ipc_wildcard_address (dirname, filename);
568+
rc = create_ipc_wildcard_address (dirname, filename);
569+
if (rc != 0) {
570+
// This may happen if tmpfile creation fails
571+
goto try_tcpip;
572+
}
569573

570574
// Initialise the address structure.
571575
rc = address.resolve (filename.c_str ());

0 commit comments

Comments
 (0)