diff options
Diffstat (limited to 'src/basic/strv.c')
-rw-r--r-- | src/basic/strv.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/basic/strv.c b/src/basic/strv.c index b66c176487..ba6df716a7 100644 --- a/src/basic/strv.c +++ b/src/basic/strv.c @@ -19,11 +19,14 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include <stdlib.h> +#include <errno.h> #include <stdarg.h> +#include <stdlib.h> #include <string.h> -#include <errno.h> +#include "alloc-util.h" +#include "escape.h" +#include "string-util.h" #include "util.h" #include "strv.h" @@ -86,6 +89,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; |