0
0
mirror of https://github.com/zeromq/libzmq.git synced 2025-01-03 03:45:43 +08:00

Don't add empty metadata to received messages

This commit is contained in:
Martin Hurton 2014-05-02 09:00:48 +02:00
parent f721a7ad07
commit e95b477a87

View File

@ -142,6 +142,7 @@ int zmq::mechanism_t::parse_metadata (const unsigned char *ptr_,
} }
if (zap_flag) { if (zap_flag) {
assert (metadata == NULL); assert (metadata == NULL);
if (!dict.empty ())
metadata = new (std::nothrow) metadata_t (dict); metadata = new (std::nothrow) metadata_t (dict);
} }
return 0; return 0;