diff options
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/popa3d/standalone.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/usr.sbin/popa3d/standalone.c b/usr.sbin/popa3d/standalone.c index f5f390351ca..e47f3404e19 100644 --- a/usr.sbin/popa3d/standalone.c +++ b/usr.sbin/popa3d/standalone.c @@ -1,4 +1,4 @@ -/* $OpenBSD: standalone.c,v 1.12 2008/05/24 02:39:23 brad Exp $ */ +/* $OpenBSD: standalone.c,v 1.13 2009/11/11 18:11:24 deraadt Exp $ */ /* * Standalone POP server: accepts connections, checks the anti-flood limits, @@ -174,8 +174,10 @@ int main(void) } freeaddrinfo(res0); - if (i == 0) + if (i == 0) { + free(pfds); return log_error("socket"); + } n = i; @@ -184,12 +186,14 @@ int main(void) switch (fork()) { case -1: + free(pfds); return log_error("fork"); case 0: break; default: + free(pfds); return 0; } @@ -209,6 +213,7 @@ int main(void) if (i < 0) { if (errno == EINTR || errno == EAGAIN) continue; + free(pfds); return log_error("poll"); } |