chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
99-systemd.rules.in: ignore nbd in the "add" uevent
[elogind.git]
/
src
/
shared
/
hashmap.c
diff --git
a/src/shared/hashmap.c
b/src/shared/hashmap.c
index ab00957306e9fb2fdb2d8e1b0e63263368973e07..e2395d4d4290caab9eb1e5a2024ba7fb294d1324 100644
(file)
--- a/
src/shared/hashmap.c
+++ b/
src/shared/hashmap.c
@@
-277,6
+277,9
@@
void hashmap_free(Hashmap*h) {
}
void hashmap_free_free(Hashmap *h) {
+ if (!h)
+ return;
+
hashmap_clear_free(h);
hashmap_free(h);
}
@@
-292,7
+295,8
@@
void hashmap_clear(Hashmap *h) {
void hashmap_clear_free(Hashmap *h) {
void *p;
- assert(h);
+ if (!h)
+ return;
while ((p = hashmap_steal_first(h)))
free(p);