diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2015-10-15 10:02:35 -0400 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-10-19 23:13:07 +0200 |
commit | ab84f5b95e10e8ffa115696ddf29c48440c5bae4 (patch) | |
tree | a156b9b64ef953463e97d3722e70f638a2efff0e /src/basic/strv.c | |
parent | 1602b008531ba6e0c704588cb2643daef26b71d9 (diff) |
strv: Add _cleanup_strv_free_erase_ and _cleanup_string_free_erase_
Diffstat (limited to 'src/basic/strv.c')
-rw-r--r-- | src/basic/strv.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/basic/strv.c b/src/basic/strv.c index b66c176487..501d022cb9 100644 --- a/src/basic/strv.c +++ b/src/basic/strv.c @@ -86,6 +86,15 @@ char **strv_free(char **l) { return NULL; } +char **strv_free_erase(char **l) { + char **i; + + STRV_FOREACH(i, l) + string_erase(*i); + + return strv_free(l); +} + char **strv_copy(char * const *l) { char **r, **k; |