fix a memory leak, found by rob@ in relayd.
authorbenno <benno@openbsd.org>
Fri, 22 Jan 2021 13:07:17 +0000 (13:07 +0000)
committerbenno <benno@openbsd.org>
Fri, 22 Jan 2021 13:07:17 +0000 (13:07 +0000)
ok tb@

usr.sbin/httpd/parse.y

index c3ccf3e..b207dca 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: parse.y,v 1.123 2021/01/18 18:47:49 tb Exp $  */
+/*     $OpenBSD: parse.y,v 1.124 2021/01/22 13:07:17 benno Exp $       */
 
 /*
  * Copyright (c) 2020 Matthias Pressfreund <mpfr@fn.de>
@@ -2143,6 +2143,7 @@ host_if(const char *s, struct addresslist *al, int max,
                                log_warnx("%s: interface name truncated",
                                    __func__);
                        freeifaddrs(ifap);
+                       free(h);
                        return (-1);
                }
                if (ipproto != -1)