From d21b3549f772028e78aef368d187bc8415cb8a39 Mon Sep 17 00:00:00 2001 From: Martin Willi Date: Fri, 5 Dec 2008 12:34:17 +0000 Subject: [PATCH] accept NULL values in hashtable enumerator --- src/libstrongswan/utils/hashtable.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/libstrongswan/utils/hashtable.c b/src/libstrongswan/utils/hashtable.c index 974292123..6b53ec261 100644 --- a/src/libstrongswan/utils/hashtable.c +++ b/src/libstrongswan/utils/hashtable.c @@ -332,8 +332,14 @@ static bool enumerate(private_enumerator_t *this, void **key, void **value) if (this->current->enumerate(this->current, &pair)) { - *key = pair->key; - *value = pair->value; + if (key) + { + *key = pair->key; + } + if (value) + { + *value = pair->value; + } return TRUE; } this->current->destroy(this->current);