diff options
author | Thomas Markwalder <tmark@isc.org> | 2015-11-05 07:07:42 -0500 |
---|---|---|
committer | Thomas Markwalder <tmark@isc.org> | 2015-11-05 07:07:42 -0500 |
commit | ce29e695745f3a660f0a0cd9e43b4b1c41bb8276 (patch) | |
tree | 0eb7242af024280a483cb502ccb43fa1e8ce2fd2 /omapip/hash.c | |
parent | e1634c24796da4d88846dbe0391df830cfa554ab (diff) | |
download | isc-dhcp-ce29e695745f3a660f0a0cd9e43b4b1c41bb8276.tar.gz |
[master] Fixed memory leask in omapi dereferencing
Merges in rt33990.
Diffstat (limited to 'omapip/hash.c')
-rw-r--r-- | omapip/hash.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/omapip/hash.c b/omapip/hash.c index b75d102b..bb5435ac 100644 --- a/omapip/hash.c +++ b/omapip/hash.c @@ -3,7 +3,8 @@ Routines for manipulating hash tables... */ /* - * Copyright (c) 2009-2010,2014 by Internet Systems Consortium, Inc. ("ISC") + * Copyright (c) 2014-2015 by Internet Systems Consortium, Inc. ("ISC") + * Copyright (c) 2009-2010 by Internet Systems Consortium, Inc. ("ISC") * Copyright (c) 2004-2007 by Internet Systems Consortium, Inc. ("ISC") * Copyright (c) 1995-2003 by Internet Software Consortium * @@ -108,7 +109,7 @@ void free_hash_table (tp, file, line) int i; struct hash_bucket *hbc, *hbn = (struct hash_bucket *)0; - for (i = 0; i < ptr -> hash_count; i++) { + for (i = 0; ptr != NULL && i < ptr -> hash_count; i++) { for (hbc = ptr -> buckets [i]; hbc; hbc = hbn) { hbn = hbc -> next; if (ptr -> dereferencer && hbc -> value) |