From 985248b638f4336688cd47f4776d4f8e26fc74c6 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 28 Nov 2006 09:06:04 +0000 Subject: r19928: Fix klokwork id 4509, 4573, 4574. (This used to be commit c004d041817f0bdf99a205090c8b026dfb0d81bc) --- source3/iniparser/src/dictionary.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'source3/iniparser/src/dictionary.c') diff --git a/source3/iniparser/src/dictionary.c b/source3/iniparser/src/dictionary.c index 1f55cb4c24..edbd6f9a35 100644 --- a/source3/iniparser/src/dictionary.c +++ b/source3/iniparser/src/dictionary.c @@ -114,7 +114,9 @@ dictionary * dictionary_new(int size) /* If no size was specified, allocate space for DICTMINSZ */ if (sizesize = size ; d->val = (char **)calloc(size, sizeof(char*)); d->key = (char **)calloc(size, sizeof(char*)); @@ -355,6 +357,10 @@ void dictionary_unset(dictionary * d, char * key) unsigned hash ; int i ; + if (key == NULL) { + return; + } + hash = dictionary_hash(key); for (i=0 ; isize ; i++) { if (d->key[i]==NULL) -- cgit