diff options
Diffstat (limited to 'shared/systemd/src/basic/hashmap.c')
-rw-r--r-- | shared/systemd/src/basic/hashmap.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/shared/systemd/src/basic/hashmap.c b/shared/systemd/src/basic/hashmap.c index 9cb2f94865..c06558316e 100644 --- a/shared/systemd/src/basic/hashmap.c +++ b/shared/systemd/src/basic/hashmap.c @@ -1518,8 +1518,11 @@ void *internal_hashmap_first_key_and_value(HashmapBase *h, bool remove, void **r unsigned idx; idx = find_first_entry(h); - if (idx == IDX_NIL) + if (idx == IDX_NIL) { + if (ret_key) + *ret_key = NULL; return NULL; + } e = bucket_at(h, idx); key = (void*) e->key; |