about summary refs log tree commit diff
path: root/shared/systemd/src/basic/hashmap.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2019-04-21 21:10:42 +0200
committerMichael Biebl <biebl@debian.org>2019-04-21 21:10:42 +0200
commit1761e93f84aba1f3a2f0ebc3d753303f27395fed (patch)
tree2a0aa70159a57641294d4aee7aee061bc25c0a7b /shared/systemd/src/basic/hashmap.c
parent6cbf8459e4602877369dbf20c6597708725758c6 (diff)
parent85563b7fc7ec2cd21e38debb9b28db342e2e8e7c (diff)
Update upstream source from tag 'upstream/1.18.0'
Update to upstream version '1.18.0'
with Debian dir c79ce54aa2bd35bd9bd13eb01cf8687eaae2c0c1
Diffstat (limited to 'shared/systemd/src/basic/hashmap.c')
-rw-r--r--shared/systemd/src/basic/hashmap.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/shared/systemd/src/basic/hashmap.c b/shared/systemd/src/basic/hashmap.c
index c0655831..9418dbd8 100644
--- a/shared/systemd/src/basic/hashmap.c
+++ b/shared/systemd/src/basic/hashmap.c
@@ -11,6 +11,7 @@
 #include "fileio.h"
 #include "hashmap.h"
 #include "macro.h"
+#include "memory-util.h"
 #include "mempool.h"
 #include "process-util.h"
 #include "random-util.h"
@@ -18,7 +19,6 @@
 #include "siphash24.h"
 #include "string-util.h"
 #include "strv.h"
-#include "util.h"
 
 #if ENABLE_DEBUG_HASHMAP
 #include <pthread.h>
@@ -1538,7 +1538,6 @@ void *internal_hashmap_first_key_and_value(HashmapBase *h, bool remove, void **r
 }
 
 unsigned internal_hashmap_size(HashmapBase *h) {
-
         if (!h)
                 return 0;
 
@@ -1546,7 +1545,6 @@ unsigned internal_hashmap_size(HashmapBase *h) {
 }
 
 unsigned internal_hashmap_buckets(HashmapBase *h) {
-
         if (!h)
                 return 0;
 
@@ -1906,8 +1904,7 @@ IteratedCache *iterated_cache_free(IteratedCache *cache) {
         if (cache) {
                 free(cache->keys.ptr);
                 free(cache->values.ptr);
-                free(cache);
         }
 
-        return NULL;
+        return mfree(cache);
 }