summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/dict.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/common/dict.c b/common/dict.c
index 3aebde7..b6e54cf 100644
--- a/common/dict.c
+++ b/common/dict.c
@@ -91,6 +91,8 @@ DICT *dict_new(void)
int dict_put(DICT *dict,const char *key,void *value)
{
struct dict_entry *entry;
+ if (key==NULL)
+ return -1;
entry=dict_entry_find(dict,key);
if ((entry==NULL)&&(value==NULL))
{