mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-13 10:52:56 +01:00
Problem: potential memory leak in test_connect_curve_fuzzer
Solution: properly initialize zmq_msg before receive
This commit is contained in:
parent
be77a8d932
commit
abb315a6da
@ -91,8 +91,10 @@ extern "C" int LLVMFuzzerTestOneInput (const uint8_t *data, size_t size)
|
||||
|
||||
zmq_msg_t msg;
|
||||
zmq_msg_init (&msg);
|
||||
while (-1 != zmq_msg_recv (&msg, client, ZMQ_DONTWAIT))
|
||||
while (-1 != zmq_msg_recv (&msg, client, ZMQ_DONTWAIT)) {
|
||||
zmq_msg_close (&msg);
|
||||
zmq_msg_init (&msg);
|
||||
}
|
||||
|
||||
close (server_accept);
|
||||
close (server);
|
||||
|
Loading…
Reference in New Issue
Block a user