summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2017-07-30 09:33:09 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2017-07-30 09:33:09 +0000
commit31e3dafd82b6f8d9f730eb03ac6dca2a4de63fb9 (patch)
treedf221dbf30468fa18aec79e8efe71628956d73f0 /usr.sbin
parentcd50f0421c962ade6e101bf74f851e8a3c1409f3 (diff)
Fix a double free of the TLS config in the error path.
OK claudio@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/relayd/relay.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.sbin/relayd/relay.c b/usr.sbin/relayd/relay.c
index 32bba1f0cc0..70fc1a83d5a 100644
--- a/usr.sbin/relayd/relay.c
+++ b/usr.sbin/relayd/relay.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: relay.c,v 1.223 2017/07/28 13:58:52 bluhm Exp $ */
+/* $OpenBSD: relay.c,v 1.224 2017/07/30 09:33:08 bluhm Exp $ */
/*
* Copyright (c) 2006 - 2014 Reyk Floeter <reyk@openbsd.org>
@@ -2155,9 +2155,8 @@ relay_tls_inspect_create(struct relay *rlay, struct ctl_relay_event *cre)
log_warnx("unable to allocate TLS config");
goto err;
}
- if (relay_tls_ctx_create_proto(rlay->rl_proto,
- tls_cfg) == -1) {
- tls_config_free(tls_cfg);
+ if (relay_tls_ctx_create_proto(rlay->rl_proto, tls_cfg) == -1) {
+ /* error already printed */
goto err;
}