diff options
author | 2016-02-07 10:24:04 +0000 | |
---|---|---|
committer | 2016-02-07 10:24:04 +0000 | |
commit | 1aaa3a75337dc51114a0a506fdd694fce010b5b7 (patch) | |
tree | bda64d548ae789a2181d4dc7631344b868fb3d51 | |
parent | avoid a double free in an error path (diff) | |
download | wireguard-openbsd-1aaa3a75337dc51114a0a506fdd694fce010b5b7.tar.xz wireguard-openbsd-1aaa3a75337dc51114a0a506fdd694fce010b5b7.zip |
avoid a use after free when parsing address ranges from a config
ok krw@
-rw-r--r-- | usr.sbin/dhcpd/memory.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/dhcpd/memory.c b/usr.sbin/dhcpd/memory.c index a214636a482..24e406dd689 100644 --- a/usr.sbin/dhcpd/memory.c +++ b/usr.sbin/dhcpd/memory.c @@ -1,4 +1,4 @@ -/* $OpenBSD: memory.c,v 1.24 2016/02/06 23:50:10 krw Exp $ */ +/* $OpenBSD: memory.c,v 1.25 2016/02/07 10:24:04 jsg Exp $ */ /* * Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium. @@ -313,6 +313,7 @@ new_address_range(struct iaddr low, struct iaddr high, struct subnet *subnet, lp->client_hostname; supersede_lease(&address_range[lhost - i], lp, 0); free(lp); + return; } else plp = lp; } |