Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
L
libzmq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
libzmq
Commits
83946d5c
Commit
83946d5c
authored
Feb 05, 2019
by
Luca Boccassi
Committed by
Luca Boccassi
Feb 07, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Problem: testutil_monitoring does not close received messages
Solution: do it, as above 32 bytes they might be on the heap
parent
edf79dfe
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
testutil_monitoring.hpp
tests/testutil_monitoring.hpp
+4
-0
No files found.
tests/testutil_monitoring.hpp
View file @
83946d5c
...
...
@@ -211,6 +211,7 @@ static int64_t get_monitor_event_internal_v2 (void *monitor_,
uint64_t
event
;
memcpy
(
&
event
,
zmq_msg_data
(
&
msg
),
sizeof
event
);
zmq_msg_close
(
&
msg
);
// Second frame in message contains event value
zmq_msg_init
(
&
msg
);
...
...
@@ -223,6 +224,7 @@ static int64_t get_monitor_event_internal_v2 (void *monitor_,
if
(
value_
)
memcpy
(
value_
,
zmq_msg_data
(
&
msg
),
sizeof
*
value_
);
zmq_msg_close
(
&
msg
);
// Third frame in message contains local address
zmq_msg_init
(
&
msg
);
...
...
@@ -237,6 +239,7 @@ static int64_t get_monitor_event_internal_v2 (void *monitor_,
memcpy
(
*
local_address_
,
data
,
size
);
(
*
local_address_
)[
size
]
=
0
;
}
zmq_msg_close
(
&
msg
);
// Fourth and last frame in message contains remote address
zmq_msg_init
(
&
msg
);
...
...
@@ -251,6 +254,7 @@ static int64_t get_monitor_event_internal_v2 (void *monitor_,
memcpy
(
*
remote_address_
,
data
,
size
);
(
*
remote_address_
)[
size
]
=
0
;
}
zmq_msg_close
(
&
msg
);
return
event
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment