strv: Add _cleanup_strv_free_erase_ and _cleanup_string_free_erase_
This commit is contained in:
committed by
Lennart Poettering
parent
1602b00853
commit
ab84f5b95e
+5
-4
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user