mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-09-01 06:45:27 +00:00
Fix sizeof bug. Add allocators for name server entries and domain search list entries
This commit is contained in:
@@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char copyright[] =
|
static char copyright[] =
|
||||||
"$Id: alloc.c,v 1.12 1997/03/29 00:01:18 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
|
"$Id: alloc.c,v 1.13 1997/05/09 07:56:13 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
#include "dhcpd.h"
|
#include "dhcpd.h"
|
||||||
@@ -184,7 +184,7 @@ struct group *new_group (name)
|
|||||||
struct protocol *new_protocol (name)
|
struct protocol *new_protocol (name)
|
||||||
char *name;
|
char *name;
|
||||||
{
|
{
|
||||||
struct protocol *rval = dmalloc (sizeof (struct group), name);
|
struct protocol *rval = dmalloc (sizeof (struct protocol), name);
|
||||||
return rval;
|
return rval;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -205,6 +205,36 @@ struct lease_state *new_lease_state (name)
|
|||||||
return rval;
|
return rval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct domain_search_list *new_domain_search_list (name)
|
||||||
|
char *name;
|
||||||
|
{
|
||||||
|
struct domain_search_list *rval =
|
||||||
|
dmalloc (sizeof (struct domain_search_list), name);
|
||||||
|
return rval;
|
||||||
|
}
|
||||||
|
|
||||||
|
struct name_server *new_name_server (name)
|
||||||
|
char *name;
|
||||||
|
{
|
||||||
|
struct name_server *rval =
|
||||||
|
dmalloc (sizeof (struct name_server), name);
|
||||||
|
return rval;
|
||||||
|
}
|
||||||
|
|
||||||
|
void free_name_server (ptr, name)
|
||||||
|
struct name_server *ptr;
|
||||||
|
char *name;
|
||||||
|
{
|
||||||
|
dfree ((VOIDPTR)ptr, name);
|
||||||
|
}
|
||||||
|
|
||||||
|
void free_domain_search_list (ptr, name)
|
||||||
|
struct domain_search_list *ptr;
|
||||||
|
char *name;
|
||||||
|
{
|
||||||
|
dfree ((VOIDPTR)ptr, name);
|
||||||
|
}
|
||||||
|
|
||||||
void free_lease_state (ptr, name)
|
void free_lease_state (ptr, name)
|
||||||
struct lease_state *ptr;
|
struct lease_state *ptr;
|
||||||
char *name;
|
char *name;
|
||||||
|
Reference in New Issue
Block a user