summaryrefslogtreecommitdiffstats
path: root/daemon/fromd
diff options
context:
space:
mode:
Diffstat (limited to 'daemon/fromd')
-rw-r--r--daemon/fromd/fromd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/daemon/fromd/fromd.c b/daemon/fromd/fromd.c
index 04f357e6..5e080f7c 100644
--- a/daemon/fromd/fromd.c
+++ b/daemon/fromd/fromd.c
@@ -26,16 +26,17 @@ static void client_cb(int fd, short event, void *arg)
// ignore clients that timeout
if (event & EV_TIMEOUT)
- return;
+ goto end;
if ( (len = read(fd, buf, sizeof(buf) - 1)) <= 0 )
- return;
+ goto end;
buf[len] = '\0';
result = ip_desc_db_lookup(buf);
write(fd, result, strlen(result));
+end:
// cleanup
close(fd);
free(arg);