mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-09-03 07:45:20 +00:00
Fix a bunch of problems in calling clone_grpup.
This commit is contained in:
@@ -43,7 +43,7 @@
|
|||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char copyright[] =
|
static char copyright[] =
|
||||||
"$Id: confpars.c,v 1.116 2000/06/08 21:20:00 mellon Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n";
|
"$Id: confpars.c,v 1.117 2000/06/12 20:14:16 mellon Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
#include "dhcpd.h"
|
#include "dhcpd.h"
|
||||||
@@ -313,9 +313,7 @@ int parse_statement (cfile, group, type, host_decl, declaration)
|
|||||||
log_fatal ("Can't allocate shared subnet: %s",
|
log_fatal ("Can't allocate shared subnet: %s",
|
||||||
isc_result_totext (status));
|
isc_result_totext (status));
|
||||||
if (!clone_group (&share -> group, group, MDL))
|
if (!clone_group (&share -> group, group, MDL))
|
||||||
log_fatal ("Can't allocate group for shared subnet.");
|
log_fatal ("Can't allocate group for shared net");
|
||||||
shared_network_reference (&share -> group -> shared_network,
|
|
||||||
share, MDL);
|
|
||||||
|
|
||||||
parse_subnet_declaration (cfile, share);
|
parse_subnet_declaration (cfile, share);
|
||||||
|
|
||||||
@@ -1072,7 +1070,8 @@ void parse_pool_statement (cfile, group, type)
|
|||||||
if (status != ISC_R_SUCCESS)
|
if (status != ISC_R_SUCCESS)
|
||||||
log_fatal ("no memory for pool.");
|
log_fatal ("no memory for pool.");
|
||||||
|
|
||||||
clone_group (&pool -> group, group, MDL);
|
if (!clone_group (&pool -> group, group, MDL))
|
||||||
|
log_fatal ("can't clone pool group");
|
||||||
|
|
||||||
if (type == SUBNET_DECL)
|
if (type == SUBNET_DECL)
|
||||||
shared_network_reference (&pool -> shared_network,
|
shared_network_reference (&pool -> shared_network,
|
||||||
@@ -1369,9 +1368,8 @@ void parse_host_declaration (cfile, group)
|
|||||||
log_fatal ("can't allocate host decl struct %s: %s",
|
log_fatal ("can't allocate host decl struct %s: %s",
|
||||||
name, isc_result_totext (status));
|
name, isc_result_totext (status));
|
||||||
host -> name = name;
|
host -> name = name;
|
||||||
if (clone_group (&host -> group, group, MDL) != ISC_R_SUCCESS) {
|
if (!clone_group (&host -> group, group, MDL)) {
|
||||||
log_fatal ("can't clone group for host %s: %s",
|
log_fatal ("can't clone group for host %s", name);
|
||||||
name, isc_result_totext (status));
|
|
||||||
boom:
|
boom:
|
||||||
host_dereference (&host, MDL);
|
host_dereference (&host, MDL);
|
||||||
return;
|
return;
|
||||||
@@ -1708,7 +1706,9 @@ int parse_class_declaration (cp, cfile, group, type)
|
|||||||
return cp ? (status == ISC_R_SUCCESS) : 1;
|
return cp ? (status == ISC_R_SUCCESS) : 1;
|
||||||
}
|
}
|
||||||
/* Give the subclass its own group. */
|
/* Give the subclass its own group. */
|
||||||
clone_group (&class -> group, class -> group, MDL);
|
if (!clone_group (&class -> group, class -> group, MDL))
|
||||||
|
log_fatal ("can't clone class group.");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!parse_lbrace (cfile)) {
|
if (!parse_lbrace (cfile)) {
|
||||||
|
Reference in New Issue
Block a user