]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Don't dump core when recursing to outermost scope.
authorTed Lemon <source@isc.org>
Tue, 9 Mar 1999 23:40:22 +0000 (23:40 +0000)
committerTed Lemon <source@isc.org>
Tue, 9 Mar 1999 23:40:22 +0000 (23:40 +0000)
common/execute.c

index f5d903b139c64480c5a78b84c3d4841179cf15b5..be28e06aa72ece6eae520e011cae720198eb2c19 100644 (file)
@@ -3,7 +3,7 @@
    Support for executable statements. */
 
 /*
- * Copyright (c) 1998 The Internet Software Consortium.
+ * Copyright (c) 1998, 1999 The Internet Software Consortium.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -42,7 +42,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: execute.c,v 1.6 1999/02/25 23:30:34 mellon Exp $ Copyright (c) 1998 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: execute.c,v 1.7 1999/03/09 23:40:22 mellon Exp $ Copyright (c) 1998, 1999 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -168,6 +168,10 @@ void execute_statements_in_scope (packet, in_options, out_options,
        struct group *scope;
        struct group *limit;
 
+       /* If we've recursed as far as we can, return. */
+       if (!group)
+               return;
+
        /* As soon as we get to a scope that is outer than the limiting
           scope, we are done.   This is so that if somebody does something
           like this, it does the expected thing: