Hi tech,

g is not freed in this error case.
Found by codechecker.

OK?
mbuhl

Index: usr.sbin/acme-client/netproc.c
===================================================================
RCS file: /cvs/src/usr.sbin/acme-client/netproc.c,v
retrieving revision 1.31
diff -u -p -r1.31 netproc.c
--- usr.sbin/acme-client/netproc.c      24 Aug 2021 10:07:30 -0000      1.31
+++ usr.sbin/acme-client/netproc.c      9 Nov 2022 18:11:17 -0000
@@ -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;
                }
 

Reply via email to