Problem: Out of memory condition not always checked

Solution: Use the appropriate assertion macro.
This commit is contained in:
Thomas Braun
2017-03-27 22:57:40 +02:00
parent fe9f6b2837
commit 33e29bd383
7 changed files with 17 additions and 0 deletions

View File

@@ -84,6 +84,8 @@ int zmq::req_t::xsend (msg_t *msg_)
// Copy request id before sending (see issue #1695 for details).
uint32_t *request_id_copy = (uint32_t *) malloc (sizeof (uint32_t));
zmq_assert (request_id_copy);
*request_id_copy = request_id;
msg_t id;