summaryrefslogtreecommitdiff
path: root/usr.sbin/acme-client
diff options
context:
space:
mode:
authorMoritz Buhl <mbuhl@cvs.openbsd.org>2022-11-09 19:11:15 +0000
committerMoritz Buhl <mbuhl@cvs.openbsd.org>2022-11-09 19:11:15 +0000
commit2942aa1e3da91ed910ffa0330acf98e1fbe3f87d (patch)
tree58884651de003ae7d6b4f80292b3e5b16a254cf5 /usr.sbin/acme-client
parent1b9a032a59d07ace30ef3c9a12bf2bb11571a0c9 (diff)
nreq could leak a http get request in case a redirect without
location header was received. OK deraadt
Diffstat (limited to 'usr.sbin/acme-client')
-rw-r--r--usr.sbin/acme-client/netproc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/acme-client/netproc.c b/usr.sbin/acme-client/netproc.c
index 4298b53d571..1d59de71700 100644
--- a/usr.sbin/acme-client/netproc.c
+++ b/usr.sbin/acme-client/netproc.c
@@ -1,4 +1,4 @@
-/* $Id: netproc.c,v 1.31 2021/08/24 10:07:30 benno Exp $ */
+/* $Id: netproc.c,v 1.32 2022/11/09 19:11:14 mbuhl Exp $ */
/*
* Copyright (c) 2016 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -222,6 +222,7 @@ again:
if ((st = http_head_get("Location", g->head, g->headsz)) ==
NULL) {
warnx("redirect without location header");
+ http_get_free(g);
return -1;
}