From: Roy Marples Date: Fri, 29 Nov 2019 00:05:48 +0000 (+0000) Subject: privsep: Fix a crash trying to close a non existant inet listener X-Git-Tag: v9.0.0~203 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=69bcbae697f9873662e36213ec7723dff5c4d0dd;p=thirdparty%2Fdhcpcd.git privsep: Fix a crash trying to close a non existant inet listener --- diff --git a/src/dhcp.c b/src/dhcp.c index 1c079eeb..f3f8592c 100644 --- a/src/dhcp.c +++ b/src/dhcp.c @@ -1528,7 +1528,8 @@ dhcp_close(struct interface *ifp) #ifdef PRIVSEP if (ifp->ctx->options & DHCPCD_PRIVSEP) { ps_bpf_closebootp(ifp); - ps_inet_closebootp(state->addr); + if (state->addr != NULL) + ps_inet_closebootp(state->addr); } #endif