From: otto Date: Sun, 11 Dec 2022 10:47:37 +0000 (+0000) Subject: Balance a getifaddrs() with a freeifaddrs(); plugs a leak seen by X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=3c46ceeaef274bbef234dac63245c4b6567168d7;p=openbsd Balance a getifaddrs() with a freeifaddrs(); plugs a leak seen by florian@ and myself. ok florian@ --- diff --git a/sbin/dhcpleased/dhcpleased.c b/sbin/dhcpleased/dhcpleased.c index cc9d98995d2..dc52c6d8a18 100644 --- a/sbin/dhcpleased/dhcpleased.c +++ b/sbin/dhcpleased/dhcpleased.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhcpleased.c,v 1.27 2022/11/27 15:19:38 kn Exp $ */ +/* $OpenBSD: dhcpleased.c,v 1.28 2022/12/11 10:47:37 otto Exp $ */ /* * Copyright (c) 2017, 2021 Florian Obser @@ -805,6 +805,7 @@ configure_interface(struct imsg_configure_interface *imsg) break; } } + freeifaddrs(ifap); req_sin_addr->sin_addr = imsg->addr; if (!found) {