chiark / gitweb /
shutdown: drop -f/-F switches again, simply because we don't want to condone non...
[elogind.git] / src / set.c
index efd20db536bda44c6b3e22c6d6f4ceaf9f102d6e..331d37e3dec626e6bde31040c1f64f5e55da4937 100644 (file)
--- a/src/set.c
+++ b/src/set.c
@@ -1,4 +1,4 @@
-/*-*- Mode: C; c-basic-offset: 8 -*-*/
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
 
 /***
   This file is part of systemd.
@@ -37,6 +37,15 @@ void set_free(Set* s) {
         hashmap_free(MAKE_HASHMAP(s));
 }
 
+void set_free_free(Set *s) {
+        void *p;
+
+        while ((p = set_steal_first(s)))
+                free(p);
+
+        set_free(s);
+}
+
 int set_ensure_allocated(Set **s, hash_func_t hash_func, compare_func_t compare_func) {
         return hashmap_ensure_allocated((Hashmap**) s, hash_func, compare_func);
 }