summaryrefslogtreecommitdiff
path: root/src/basic/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/basic/util.c')
-rw-r--r--src/basic/util.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/basic/util.c b/src/basic/util.c
index f24db9796e..a14ed2e4cc 100644
--- a/src/basic/util.c
+++ b/src/basic/util.c
@@ -6817,9 +6817,10 @@ void string_erase(char *x) {
memory_erase(x, strlen(x));
}
-void strv_erase(char **l) {
- char **i;
+char *string_free_erase(char *s) {
+ if (!s)
+ return NULL;
- STRV_FOREACH(i, l)
- string_erase(*i);
+ string_erase(s);
+ return mfree(s);
}