diff options
author | Ted Lemon <source@isc.org> | 2001-06-20 03:54:29 +0000 |
---|---|---|
committer | Ted Lemon <source@isc.org> | 2001-06-20 03:54:29 +0000 |
commit | b115e2b4a98af188e58b12fb252dc8e3e9405290 (patch) | |
tree | 05657dc653305932971281f386e0d8ba819562c5 /omapip | |
parent | 7e702d569d9f27069d2053553b729c5546924400 (diff) | |
download | isc-dhcp-b115e2b4a98af188e58b12fb252dc8e3e9405290.tar.gz |
Fix some omissions in free_hash_table.
Diffstat (limited to 'omapip')
-rw-r--r-- | omapip/hash.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/omapip/hash.c b/omapip/hash.c index ed395452..a3b8bf75 100644 --- a/omapip/hash.c +++ b/omapip/hash.c @@ -43,7 +43,7 @@ #ifndef lint static char copyright[] = -"$Id: hash.c,v 1.1.2.1 2001/06/05 17:56:39 mellon Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n"; +"$Id: hash.c,v 1.1.2.2 2001/06/20 03:54:29 mellon Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include <omapip/omapip_p.h> @@ -75,18 +75,20 @@ void free_hash_table (ptr, file, line) int i; struct hash_bucket *hbc, *hbn = (struct hash_bucket *)0; -#if defined (DEBUG_MEMORY_LEAKAGE) +#if defined (DEBUG_MEMORY_LEAKAGE) || \ + defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT) for (i = 0; i < ptr -> hash_count; i++) { for (hbc = ptr -> buckets [i]; hbc; hbc = hbn) { hbn = hbc -> next; if (ptr -> dereferencer && hbc -> value) - (*ptr -> dereferencer) (&hbc -> value, file, line); - dfree (hbc, file, line); + (*ptr -> dereferencer) (&hbc -> value, MDL); + free_hash_bucket (hbc, MDL); } + ptr -> buckets [i] = (struct hash_bucket *)0; } #endif - dfree ((VOIDPTR)ptr, file, line); + dfree ((VOIDPTR)ptr, MDL); } struct hash_bucket *free_hash_buckets; |