diff options
| author | 2006-10-15 18:23:44 +0000 | |
|---|---|---|
| committer | 2006-10-15 18:23:44 +0000 | |
| commit | 2e6efe125828572068069f14705e6019ff7067bb (patch) | |
| tree | 1c78eadee437bb89d361934f2a5697fa62e03915 /usr.sbin/ftp-proxy/ftp-proxy.c | |
| parent | Fix last commit. (diff) | |
| download | wireguard-openbsd-2e6efe125828572068069f14705e6019ff7067bb.tar.xz wireguard-openbsd-2e6efe125828572068069f14705e6019ff7067bb.zip | |
Close file descriptors before cleaning up the events, might cause a race
otherwise.
Diffstat (limited to 'usr.sbin/ftp-proxy/ftp-proxy.c')
| -rw-r--r-- | usr.sbin/ftp-proxy/ftp-proxy.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.sbin/ftp-proxy/ftp-proxy.c b/usr.sbin/ftp-proxy/ftp-proxy.c index ce3a2ac67ab..45b6b4dc642 100644 --- a/usr.sbin/ftp-proxy/ftp-proxy.c +++ b/usr.sbin/ftp-proxy/ftp-proxy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ftp-proxy.c,v 1.9 2006/03/25 20:21:42 camield Exp $ */ +/* $OpenBSD: ftp-proxy.c,v 1.10 2006/10/15 18:23:44 camield Exp $ */ /* * Copyright (c) 2004, 2005 Camiel Dobbelaar, <cd@sentia.nl> @@ -278,16 +278,16 @@ end_session(struct session *s) logmsg(LOG_INFO, "#%d ending session", s->id); - if (s->client_bufev) - bufferevent_free(s->client_bufev); - if (s->server_bufev) - bufferevent_free(s->server_bufev); - if (s->client_fd != -1) close(s->client_fd); if (s->server_fd != -1) close(s->server_fd); + if (s->client_bufev) + bufferevent_free(s->client_bufev); + if (s->server_bufev) + bufferevent_free(s->server_bufev); + /* Remove rulesets by commiting empty ones. */ err = 0; if (prepare_commit(s->id) == -1) |
