aboutsummaryrefslogtreecommitdiffstats
path: root/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'util.c')
-rw-r--r--util.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/util.c b/util.c
new file mode 100644
index 0000000..436a304
--- /dev/null
+++ b/util.c
@@ -0,0 +1,11 @@
+#include <stdlib.h>
+
+#include "util.h"
+
+void
+free_arr(void **arr, int n) {
+ while (n-- > 0) {
+ free(arr[n]);
+ }
+ free(arr);
+}