aboutsummaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/util.c b/src/util.c
index 669e031..ac178cc 100644
--- a/src/util.c
+++ b/src/util.c
@@ -205,3 +205,14 @@ next:
buffer[n] = '\0';
return buffer;
}
+
+void strfree(char **list)
+{
+ if (list == NULL)
+ return;
+
+ for (char **head = list; *head != NULL; head++)
+ free(*head);
+
+ free(list);
+}