diff options
author | 2018-11-14 17:24:01 +0000 | |
---|---|---|
committer | 2018-11-14 17:24:01 +0000 | |
commit | 3d365c58d88e80259995b591f0b1bf55eeae62bb (patch) | |
tree | 326c9064cc9c13ae885b681c4f5b30f6f2e2ba5d | |
parent | free(9) sizes for configuration descriptors, missed in previous. (diff) | |
download | wireguard-openbsd-3d365c58d88e80259995b591f0b1bf55eeae62bb.tar.xz wireguard-openbsd-3d365c58d88e80259995b591f0b1bf55eeae62bb.zip |
Plug memory leak in host()'s error code path
OK claudio@
-rw-r--r-- | usr.sbin/bgpd/config.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/bgpd/config.c b/usr.sbin/bgpd/config.c index a8cb616790f..6cc77d2d1c6 100644 --- a/usr.sbin/bgpd/config.c +++ b/usr.sbin/bgpd/config.c @@ -1,4 +1,4 @@ -/* $OpenBSD: config.c,v 1.77 2018/09/29 08:11:11 claudio Exp $ */ +/* $OpenBSD: config.c,v 1.78 2018/11/14 17:24:01 mestre Exp $ */ /* * Copyright (c) 2003, 2004, 2005 Henning Brauer <henning@openbsd.org> @@ -340,6 +340,7 @@ host(const char *s, struct bgpd_addr *h, u_int8_t *len) mask = strtonum(p+1, 0, 128, &errstr); if (errstr) { log_warnx("prefixlen is %s: %s", errstr, p); + free(ps); return (0); } p[0] = '\0'; |