mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-25 18:23:01 +02:00
Problem: excessive memory allocations around blob_t (#2796)
* Problem: excessive memory allocations around blob_t Solution: redefine blob_t as a custom type, and use reference/move semantics where possible
This commit is contained in:
committed by
Luca Boccassi
parent
cfef04035c
commit
0897b3e07b
@@ -901,7 +901,7 @@ int zmq::stream_engine_t::write_credential (msg_t *msg_)
|
||||
zmq_assert (mechanism != NULL);
|
||||
zmq_assert (session != NULL);
|
||||
|
||||
const blob_t credential = mechanism->get_user_id ();
|
||||
const blob_t &credential = mechanism->get_user_id ();
|
||||
if (credential.size () > 0) {
|
||||
msg_t msg;
|
||||
int rc = msg.init_size (credential.size ());
|
||||
|
||||
Reference in New Issue
Block a user