]> git.ipfire.org Git - thirdparty/systemd.git/commit
hashmap: rework hashmap_clear() to be more defensive
authorLennart Poettering <lennart@poettering.net>
Mon, 17 Dec 2018 17:42:09 +0000 (18:42 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 18 Dec 2018 10:28:10 +0000 (11:28 +0100)
commitc380b84d8b88ca61371d8fdb77d5719c778700fc
tree92b2d86fa32ec2f197836400f3bef98c0c9c5353
parent1a126325eb26decfe4d3bb64c6ec1c27cafb8c73
hashmap: rework hashmap_clear() to be more defensive

Let's first remove an item from the hashmap and only then destroy it.
This makes sure that destructor functions can mdoify the hashtables in
their own codee and we won't be confused by that.
src/basic/hashmap.c
src/basic/hashmap.h