Set ifi->offer to NULL after free'ing it.
authorkrw <krw@openbsd.org>
Thu, 7 Dec 2017 19:17:13 +0000 (19:17 +0000)
committerkrw <krw@openbsd.org>
Thu, 7 Dec 2017 19:17:13 +0000 (19:17 +0000)
sbin/dhclient/dhclient.c

index e2045a4..4de0fda 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: dhclient.c,v 1.537 2017/12/07 19:03:15 krw Exp $      */
+/*     $OpenBSD: dhclient.c,v 1.538 2017/12/07 19:17:13 krw Exp $      */
 
 /*
  * Copyright 2004 Henning Brauer <henning@openbsd.org>
@@ -854,6 +854,7 @@ state_selecting(struct interface_info *ifi)
 
        /* Toss the lease we picked - we'll get it back in a DHCPACK. */
        free_client_lease(ifi->offer);
+       ifi->offer = NULL;
 
        send_request(ifi);
 }