summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrob <rob@cvs.openbsd.org>2021-01-17 15:17:14 +0000
committerrob <rob@cvs.openbsd.org>2021-01-17 15:17:14 +0000
commit1214f8430a6c6a970a99c0af38ce050234e52714 (patch)
tree3ade4ddc9862c1aa3c7a0d3bc2c4394f66d1df91
parentdda19f236ed115ebf12cba32b9fc0483b0f76f52 (diff)
Don't leak host address. Found with clang static analyzer.
OK tb@
-rw-r--r--usr.sbin/relayd/parse.y3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/relayd/parse.y b/usr.sbin/relayd/parse.y
index 9523366749d..5f7513e788d 100644
--- a/usr.sbin/relayd/parse.y
+++ b/usr.sbin/relayd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.251 2021/01/09 08:53:57 denis Exp $ */
+/* $OpenBSD: parse.y,v 1.252 2021/01/17 15:17:13 rob Exp $ */
/*
* Copyright (c) 2007 - 2014 Reyk Floeter <reyk@openbsd.org>
@@ -3217,6 +3217,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)