Complete deleting ifi->active before calling write_lease_db().
authorkrw <krw@openbsd.org>
Wed, 24 Feb 2021 16:53:18 +0000 (16:53 +0000)
committerkrw <krw@openbsd.org>
Wed, 24 Feb 2021 16:53:18 +0000 (16:53 +0000)
No functional change but a bit more obvious and shrinks upcoming diff.

sbin/dhclient/dhclient.c

index 68567db..2104d31 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: dhclient.c,v 1.702 2021/02/24 16:36:47 krw Exp $      */
+/*     $OpenBSD: dhclient.c,v 1.703 2021/02/24 16:53:18 krw Exp $      */
 
 /*
  * Copyright 2004 Henning Brauer <henning@openbsd.org>
@@ -2744,10 +2744,10 @@ release_lease(struct interface_info *ifi)
        imsg_flush(unpriv_ibuf);
 
        TAILQ_REMOVE(&ifi->lease_db, ifi->active, next);
-       write_lease_db(&ifi->lease_db);
-
        free_client_lease(ifi->active);
        ifi->active = NULL;
+       write_lease_db(&ifi->lease_db);
+
        free(ifi->configured);
        ifi->configured = NULL;
        free(ifi->unwind_info);