summaryrefslogtreecommitdiff
path: root/src/or/eventdns.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2008-01-14 19:00:23 +0000
committerNick Mathewson <nickm@torproject.org>2008-01-14 19:00:23 +0000
commit3b8f76aa512338ec91104240d28d8f32246b5eb6 (patch)
treea0cfda3a8a0007ecea1bfaa242e7f5d1eda378e3 /src/or/eventdns.c
parente49229caf8645564646354c6f3670db2cab26583 (diff)
downloadtor-3b8f76aa512338ec91104240d28d8f32246b5eb6.tar.gz
tor-3b8f76aa512338ec91104240d28d8f32246b5eb6.zip
r17611@catbus: nickm | 2008-01-14 13:44:16 -0500
add some missing checks for failing return values. svn:r13130
Diffstat (limited to 'src/or/eventdns.c')
-rw-r--r--src/or/eventdns.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/or/eventdns.c b/src/or/eventdns.c
index cfdfd0f037..d923d26cc1 100644
--- a/src/or/eventdns.c
+++ b/src/or/eventdns.c
@@ -1462,7 +1462,10 @@ evdns_add_server_port(int socket, int is_tcp, evdns_request_callback_fn_type cb,
event_set(&port->event, port->socket, EV_READ | EV_PERSIST,
server_port_ready_callback, port);
- event_add(&port->event, NULL); /* check return. */
+ if (event_add(&port->event, NULL)<0) {
+ free(port);
+ return NULL;
+ }
return port;
}