]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Don't dereference the lease on_expiry pointer if it's been zapped.
authorTed Lemon <source@isc.org>
Thu, 6 Jul 2000 06:26:42 +0000 (06:26 +0000)
committerTed Lemon <source@isc.org>
Thu, 6 Jul 2000 06:26:42 +0000 (06:26 +0000)
server/mdb.c

index e85a5e98162efc83026a39fbc49689e495f2e481..5f4ed37170b522e05d091d2438773c71f6af4b28 100644 (file)
@@ -43,7 +43,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: mdb.c,v 1.36 2000/07/05 07:38:09 mellon Exp $ Copyright (c) 1996-2000 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: mdb.c,v 1.37 2000/07/06 06:26:42 mellon Exp $ Copyright (c) 1996-2000 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -1015,8 +1015,9 @@ void process_state_transition (struct lease *lease)
                                            (struct option_state *)0, /* XXX */
                                            &lease -> scope,
                                            lease -> on_expiry);
-                       executable_statement_dereference (&lease -> on_expiry,
-                                                         MDL);
+                       if (lease -> on_expiry)
+                               executable_statement_dereference
+                                       (&lease -> on_expiry, MDL);
                }
                
                /* No sense releasing a lease after it's expired. */