util: Add l_strv_free function
diff --git a/ell/util.c b/ell/util.c
index 0a5da8a..c021a83 100644
--- a/ell/util.c
+++ b/ell/util.c
@@ -250,14 +250,7 @@
  **/
 LIB_EXPORT void l_strfreev(char **strlist)
 {
-	if (likely(strlist)) {
-		int i;
-
-		for (i = 0; strlist[i]; i++)
-			l_free(strlist[i]);
-
-		l_free(strlist);
-	}
+	l_strv_free(strlist);
 }
 
 /**
@@ -414,6 +407,24 @@
 }
 
 /**
+ * l_strv_free:
+ * @str_array: a %NULL terminated array of strings
+ *
+ * Frees strings in @str_array and @str_array itself
+ **/
+LIB_EXPORT void l_strv_free(char **str_array)
+{
+	if (likely(str_array)) {
+		int i;
+
+		for (i = 0; str_array[i]; i++)
+			l_free(str_array[i]);
+
+		l_free(str_array);
+	}
+}
+
+/**
  * l_strv_length:
  * @str_array: a %NULL terminated array of strings
  *
diff --git a/ell/util.h b/ell/util.h
index 355ed8a..e42d751 100644
--- a/ell/util.h
+++ b/ell/util.h
@@ -264,6 +264,7 @@
 char **l_strsplit(const char *str, const char sep);
 char **l_strsplit_set(const char *str, const char *separators);
 char *l_strjoinv(char **str_array, const char delim);
+void l_strv_free(char **str_array);
 unsigned int l_strv_length(char **str_array);
 bool l_strv_contains(char **str_array, const char *item);
 char **l_strv_append(char **str_array, const char *str);