nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
readme: add information section
[nit.git]
/
lib
/
libevent.nit
diff --git
a/lib/libevent.nit
b/lib/libevent.nit
index
9cbe38e
..
c01d417
100644
(file)
--- a/
lib/libevent.nit
+++ b/
lib/libevent.nit
@@
-346,6
+346,10
@@
extern class ConnectionListener `{ struct evconnlistener * `}
struct hostent *hostent = gethostbyname(address);
+ if (!hostent) {
+ return NULL;
+ }
+
memset(&sin, 0, sizeof(sin));
sin.sin_family = hostent->h_addrtype;
sin.sin_port = htons(port);