mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-08-30 13:57:50 +00:00
Allocate class with class_allocate, not dmalloc.
This commit is contained in:
@@ -43,7 +43,7 @@
|
|||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char copyright[] =
|
static char copyright[] =
|
||||||
"$Id: class.c,v 1.21 2000/08/28 19:36:09 neild Exp $ Copyright (c) 1998-2000 The Internet Software Consortium. All rights reserved.\n";
|
"$Id: class.c,v 1.22 2000/09/06 20:26:13 mellon Exp $ Copyright (c) 1998-2000 The Internet Software Consortium. All rights reserved.\n";
|
||||||
|
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
@@ -126,6 +126,7 @@ int check_collection (packet, lease, collection)
|
|||||||
data_string_forget (&data, MDL);
|
data_string_forget (&data, MDL);
|
||||||
classify (packet, nc);
|
classify (packet, nc);
|
||||||
matched = 1;
|
matched = 1;
|
||||||
|
class_dereference (&nc, MDL);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!class -> spawning) {
|
if (!class -> spawning) {
|
||||||
@@ -136,11 +137,11 @@ int check_collection (packet, lease, collection)
|
|||||||
log_info ("spawning subclass %s.",
|
log_info ("spawning subclass %s.",
|
||||||
print_hex_1 (data.len, data.data, 60));
|
print_hex_1 (data.len, data.data, 60));
|
||||||
#endif
|
#endif
|
||||||
nc = (struct class *)
|
status = class_allocate (&nc, MDL);
|
||||||
dmalloc (sizeof (struct class), MDL);
|
group_reference (&nc -> group,
|
||||||
memset (nc, 0, sizeof *nc);
|
class -> group, MDL);
|
||||||
nc -> group = class -> group;
|
class_reference (&nc -> superclass,
|
||||||
nc -> superclass = class;
|
class, MDL);
|
||||||
nc -> lease_limit = class -> lease_limit;
|
nc -> lease_limit = class -> lease_limit;
|
||||||
nc -> dirty = 1;
|
nc -> dirty = 1;
|
||||||
if (nc -> lease_limit) {
|
if (nc -> lease_limit) {
|
||||||
@@ -155,7 +156,7 @@ int check_collection (packet, lease, collection)
|
|||||||
data_string_forget
|
data_string_forget
|
||||||
(&nc -> hash_string,
|
(&nc -> hash_string,
|
||||||
MDL);
|
MDL);
|
||||||
dfree (nc, MDL);
|
class_dereference (&nc, MDL);
|
||||||
data_string_forget (&data,
|
data_string_forget (&data,
|
||||||
MDL);
|
MDL);
|
||||||
continue;
|
continue;
|
||||||
|
Reference in New Issue
Block a user