diff options
| author | 2010-01-01 20:46:19 +0000 | |
|---|---|---|
| committer | 2010-01-01 20:46:19 +0000 | |
| commit | 92b98df2642671e37934594be83501db45926dc8 (patch) | |
| tree | 0e3fca173892fd717bdd3d8459d8c0ad6194e4ea /usr.sbin/dhcpd/alloc.c | |
| parent | Wrappers around a wrapper around free() are of no more use than (diff) | |
| download | wireguard-openbsd-92b98df2642671e37934594be83501db45926dc8.tar.xz wireguard-openbsd-92b98df2642671e37934594be83501db45926dc8.zip | |
Eliminate all uses of dfree() where the pointer is either dereferenced
immediately before the use or the pointer is checked for NULL before
the call. And then there were none, so kill dfree().
Diffstat (limited to 'usr.sbin/dhcpd/alloc.c')
| -rw-r--r-- | usr.sbin/dhcpd/alloc.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/usr.sbin/dhcpd/alloc.c b/usr.sbin/dhcpd/alloc.c index d658d0c43b5..f3306f87cb2 100644 --- a/usr.sbin/dhcpd/alloc.c +++ b/usr.sbin/dhcpd/alloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: alloc.c,v 1.10 2010/01/01 20:30:24 krw Exp $ */ +/* $OpenBSD: alloc.c,v 1.11 2010/01/01 20:46:19 krw Exp $ */ /* Memory allocation... */ @@ -54,16 +54,6 @@ dmalloc(int size, char *name) return (foo); } -void -dfree(void *ptr, char *name) -{ - if (!ptr) { - warning("dfree %s: free on null pointer.", name); - return; - } - free(ptr); -} - struct tree_cache *free_tree_caches; struct tree_cache * @@ -107,7 +97,7 @@ void free_lease_state(struct lease_state *ptr, char *name) { if (ptr->prl) - dfree(ptr->prl, name); + free(ptr->prl); ptr->next = free_lease_states; free_lease_states = ptr; } |
