From: Roy Marples Date: Tue, 3 May 2016 15:43:34 +0000 (+0000) Subject: Fix closing fd. X-Git-Tag: v6.11.0~38 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=40c6695049452bed1c4bfc0d5316edb8dd302598;p=thirdparty%2Fdhcpcd.git Fix closing fd. --- diff --git a/dhcp.c b/dhcp.c index da99a808..5fa01998 100644 --- a/dhcp.c +++ b/dhcp.c @@ -1144,7 +1144,7 @@ read_lease(struct interface *ifp) ifp->name, state->leasefile); dhcp = calloc(1, sizeof(*dhcp)); if (dhcp == NULL) { - if (state->leasefile[0] != '\0') + if (fd_opened) close(fd); return NULL; }