Problem: Program crashes if memory allocation in socket_poller_t::rebuild fails.

Solution: Report memory allocation failure as ENOMEM so applications can handle it gracefully.

Fixes #3427.
This commit is contained in:
Eelis van der Weegen
2019-02-23 01:35:30 +01:00
parent cdc4b8c6c6
commit 8259c519b3
3 changed files with 18 additions and 6 deletions

View File

@@ -101,7 +101,7 @@ class socket_poller_t
uint64_t &now_,
uint64_t &end_,
bool &first_pass_);
void rebuild ();
int rebuild ();
// Used to check whether the object is a socket_poller.
uint32_t _tag;