diff options
author | Sebastian Benoit <benno@cvs.openbsd.org> | 2015-12-30 12:08:35 +0000 |
---|---|---|
committer | Sebastian Benoit <benno@cvs.openbsd.org> | 2015-12-30 12:08:35 +0000 |
commit | e69a3c5d320cda72d4121ed5dd5fd91013fe7441 (patch) | |
tree | a7a23193aca4a33d19943cbf839127a22da3dc56 /usr.sbin | |
parent | 19c7ff974f700039dc10da11f3efc5bd1b6cd664 (diff) |
now that ibuf_free() checks for null, we can remove the check here.
ok mmcc@ millert@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/relayd/check_tcp.c | 8 | ||||
-rw-r--r-- | usr.sbin/relayd/relayd.c | 5 | ||||
-rw-r--r-- | usr.sbin/relayd/ssl.c | 8 |
3 files changed, 8 insertions, 13 deletions
diff --git a/usr.sbin/relayd/check_tcp.c b/usr.sbin/relayd/check_tcp.c index 0b19d47e6f2..9ff40681c4e 100644 --- a/usr.sbin/relayd/check_tcp.c +++ b/usr.sbin/relayd/check_tcp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: check_tcp.c,v 1.49 2015/12/24 13:58:30 benno Exp $ */ +/* $OpenBSD: check_tcp.c,v 1.50 2015/12/30 12:08:34 benno Exp $ */ /* * Copyright (c) 2006 Pierre-Yves Ritschard <pyr@openbsd.org> @@ -141,10 +141,8 @@ tcp_close(struct ctl_tcp_event *cte, int status) cte->s = -1; if (status != 0) cte->host->up = status; - if (cte->buf) { - ibuf_free(cte->buf); - cte->buf = NULL; - } + ibuf_free(cte->buf); + cte->buf = NULL; } void diff --git a/usr.sbin/relayd/relayd.c b/usr.sbin/relayd/relayd.c index 7b2651d1588..0fb444a00d1 100644 --- a/usr.sbin/relayd/relayd.c +++ b/usr.sbin/relayd/relayd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: relayd.c,v 1.150 2015/12/07 04:03:27 mmcc Exp $ */ +/* $OpenBSD: relayd.c,v 1.151 2015/12/30 12:08:34 benno Exp $ */ /* * Copyright (c) 2007 - 2014 Reyk Floeter <reyk@openbsd.org> @@ -565,8 +565,7 @@ purge_table(struct relayd *env, struct tablelist *head, struct table *table) event_del(&host->cte.ev); close(host->cte.s); } - if (host->cte.buf != NULL) - ibuf_free(host->cte.buf); + ibuf_free(host->cte.buf); if (host->cte.ssl != NULL) SSL_free(host->cte.ssl); free(host); diff --git a/usr.sbin/relayd/ssl.c b/usr.sbin/relayd/ssl.c index 0697857d4c2..dbc5f4469c5 100644 --- a/usr.sbin/relayd/ssl.c +++ b/usr.sbin/relayd/ssl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl.c,v 1.29 2015/03/24 08:44:04 giovanni Exp $ */ +/* $OpenBSD: ssl.c,v 1.30 2015/12/30 12:08:34 benno Exp $ */ /* * Copyright (c) 2007 - 2014 Reyk Floeter <reyk@openbsd.org> @@ -216,10 +216,8 @@ ssl_cleanup(struct ctl_tcp_event *cte) SSL_shutdown(cte->ssl); SSL_clear(cte->ssl); } - if (cte->buf != NULL) { - ibuf_free(cte->buf); - cte->buf = NULL; - } + ibuf_free(cte->buf); + cte->buf = NULL; } void |