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
213254cc
Commit
213254cc
authored
May 13, 2018
by
Simon Giesecke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Problem: inconsistent behaviour of zmq_poller_new in case of memory exhaustion
Solution: return NULL and set errno to ENOMEM
parent
2cd147e5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
zmq.cpp
src/zmq.cpp
+3
-2
No files found.
src/zmq.cpp
View file @
213254cc
...
...
@@ -1167,7 +1167,9 @@ int zmq_poll (zmq_pollitem_t *items_, int nitems_, long timeout_)
void
*
zmq_poller_new
(
void
)
{
zmq
::
socket_poller_t
*
poller
=
new
(
std
::
nothrow
)
zmq
::
socket_poller_t
;
alloc_assert
(
poller
);
if
(
!
poller
)
{
errno
=
ENOMEM
;
}
return
poller
;
}
...
...
@@ -1295,7 +1297,6 @@ int zmq_poller_remove_fd (void *poller_, int fd_)
return
((
zmq
::
socket_poller_t
*
)
poller_
)
->
remove_fd
(
fd_
);
}
int
zmq_poller_wait
(
void
*
poller_
,
zmq_poller_event_t
*
event_
,
long
timeout_
)
{
if
(
!
poller_
||
!
((
zmq
::
socket_poller_t
*
)
poller_
)
->
check_tag
())
{
...
...
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