diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2021-12-05 13:48:15 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2021-12-05 13:48:15 +0000 |
commit | 1ed066e7ad4fad8d3f6a44daaf7273564ba68dcf (patch) | |
tree | 15420fb63cc19ae205ff9206dbdff09091d88943 /usr.sbin/relayd | |
parent | df7d9adcbcd3616938133d84d6c9525b238c2e20 (diff) |
fix use after free
ok tb@
Diffstat (limited to 'usr.sbin/relayd')
-rw-r--r-- | usr.sbin/relayd/config.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/relayd/config.c b/usr.sbin/relayd/config.c index d982f356cb3..a2f1c130d6b 100644 --- a/usr.sbin/relayd/config.c +++ b/usr.sbin/relayd/config.c @@ -1,4 +1,4 @@ -/* $OpenBSD: config.c,v 1.42 2021/07/14 13:33:57 kn Exp $ */ +/* $OpenBSD: config.c,v 1.43 2021/12/05 13:48:14 jsg Exp $ */ /* * Copyright (c) 2011 - 2014 Reyk Floeter <reyk@openbsd.org> @@ -192,13 +192,13 @@ config_purge(struct relayd *env, u_int reset) TAILQ_REMOVE(env->sc_protos, proto, entry); free(proto->style); free(proto->tlscapass); - free(proto); while ((keyname = TAILQ_FIRST(&proto->tlscerts)) != NULL) { TAILQ_REMOVE(&proto->tlscerts, keyname, entry); free(keyname->name); free(keyname); } + free(proto); } env->sc_protocount = 0; } |