diff options
author | Ted Lemon <source@isc.org> | 1999-02-25 23:30:43 +0000 |
---|---|---|
committer | Ted Lemon <source@isc.org> | 1999-02-25 23:30:43 +0000 |
commit | 74f45f9642639bf4dfc7a28595363055d4c1b955 (patch) | |
tree | 84218f8405c4619b257b60a5bd5941090d9af0fa /common/alloc.c | |
parent | ce53cc84e93fb0cdb4d6fa912577ea45074ea0f7 (diff) | |
download | isc-dhcp-74f45f9642639bf4dfc7a28595363055d4c1b955.tar.gz |
Sync with 2.0b1pl16. Fix some pool allocation problems.
Diffstat (limited to 'common/alloc.c')
-rw-r--r-- | common/alloc.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/common/alloc.c b/common/alloc.c index 611853f6..0ba79d82 100644 --- a/common/alloc.c +++ b/common/alloc.c @@ -42,7 +42,7 @@ #ifndef lint static char copyright[] = -"$Id: alloc.c,v 1.23 1999/02/24 17:56:43 mellon Exp $ Copyright (c) 1995, 1996, 1998 The Internet Software Consortium. All rights reserved.\n"; +"$Id: alloc.c,v 1.24 1999/02/25 23:30:33 mellon Exp $ Copyright (c) 1995, 1996, 1998 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -344,6 +344,27 @@ void free_failover_peer (peer, name) } #endif /* defined (FAILOVER_PROTOCOL) */ +struct auth_key *new_auth_key (len, name) + int len; + char *name; +{ + struct auth_key *peer; + int size = len - 1 + sizeof (struct auth_key); + + peer = (struct auth_key *)dmalloc (size, name); + if (!peer) + return peer; + memset (peer, 0, size); + return peer; +} + +void free_auth_key (peer, name) + struct auth_key *peer; + char *name; +{ + dfree (peer, name); +} + struct permit *new_permit (name) char *name; { |