diff --git a/src/basic/strv.c b/src/basic/strv.c index 9aa9c740c3..2ba5a94839 100644 --- a/src/basic/strv.c +++ b/src/basic/strv.c @@ -860,16 +860,6 @@ bool strv_fnmatch_full(char* const* patterns, const char *s, int flags, size_t * return false; } -char*** strv_free_free(char ***l) { - if (!l) - return NULL; - - for (char ***i = l; *i; i++) - strv_free(*i); - - return mfree(l); -} - char** strv_skip(char **l, size_t n) { while (n > 0) { diff --git a/src/basic/strv.h b/src/basic/strv.h index 238ac60622..092d40c84b 100644 --- a/src/basic/strv.h +++ b/src/basic/strv.h @@ -228,9 +228,6 @@ static inline bool strv_fnmatch_or_empty(char* const* patterns, const char *s, i strv_fnmatch_full(patterns, s, flags, NULL); } -char*** strv_free_free(char ***l); -DEFINE_TRIVIAL_CLEANUP_FUNC(char***, strv_free_free); - char** strv_skip(char **l, size_t n); int strv_extend_n(char ***l, const char *value, size_t n); diff --git a/src/test/test-strv.c b/src/test/test-strv.c index a025f34408..94581fc832 100644 --- a/src/test/test-strv.c +++ b/src/test/test-strv.c @@ -917,17 +917,6 @@ TEST(strv_make_nulstr) { test_strv_make_nulstr_one(STRV_MAKE("foo", "bar", "quuux")); } -TEST(strv_free_free) { - char ***t; - - assert_se(t = new(char**, 3)); - assert_se(t[0] = strv_new("a", "b")); - assert_se(t[1] = strv_new("c", "d", "e")); - t[2] = NULL; - - t = strv_free_free(t); -} - TEST(foreach_string) { const char * const t[] = { "foo",