summaryrefslogtreecommitdiff
path: root/usr.sbin/dhcpd/alloc.c
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2010-01-01 20:30:26 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2010-01-01 20:30:26 +0000
commit70851fc3b8f8519297ae742736b560f88a290afe (patch)
tree730c0931d515ad3f97fe166f6402275b893123b0 /usr.sbin/dhcpd/alloc.c
parentfbff479fd1a821ce274339c2e43bb9ded5ddbd95 (diff)
Wrappers around a wrapper around free() are of no more use than
wrappers around wrappers around calloc(). The purpose of the free() wrapper is to generate an error message when free'ing NULL. But free_hash_bucket(), free_lease(), and free_tree() are all called immediately after dereferencing the pointer to be freed. Thus the error message will never be issued.
Diffstat (limited to 'usr.sbin/dhcpd/alloc.c')
-rw-r--r--usr.sbin/dhcpd/alloc.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/usr.sbin/dhcpd/alloc.c b/usr.sbin/dhcpd/alloc.c
index 01db3635eb0..d658d0c43b5 100644
--- a/usr.sbin/dhcpd/alloc.c
+++ b/usr.sbin/dhcpd/alloc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: alloc.c,v 1.9 2010/01/01 19:10:24 krw Exp $ */
+/* $OpenBSD: alloc.c,v 1.10 2010/01/01 20:30:24 krw Exp $ */
/* Memory allocation... */
@@ -83,24 +83,12 @@ new_tree_cache(char *name)
}
void
-free_hash_bucket(struct hash_bucket *ptr, char *name)
-{
- dfree(ptr, name);
-}
-
-void
free_tree_cache(struct tree_cache *ptr)
{
ptr->value = (unsigned char *)free_tree_caches;
free_tree_caches = ptr;
}
-void
-free_tree(struct tree *ptr, char *name)
-{
- dfree(ptr, name);
-}
-
struct lease_state *
new_lease_state(char *name)
{
@@ -123,9 +111,3 @@ free_lease_state(struct lease_state *ptr, char *name)
ptr->next = free_lease_states;
free_lease_states = ptr;
}
-
-void
-free_lease(struct lease *ptr, char *name)
-{
- dfree(ptr, name);
-}