From ce29e695745f3a660f0a0cd9e43b4b1c41bb8276 Mon Sep 17 00:00:00 2001 From: Thomas Markwalder Date: Thu, 5 Nov 2015 07:07:42 -0500 Subject: [master] Fixed memory leask in omapi dereferencing Merges in rt33990. --- omapip/hash.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'omapip/hash.c') 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) -- cgit v1.2.1