aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ht/ft_htnew.c2
-rw-r--r--src/lst/ft_lstlfind.c4
-rw-r--r--src/lst/ft_lstlsearch.c4
-rw-r--r--src/util/ft_split_destroy.c24
4 files changed, 29 insertions, 5 deletions
diff --git a/src/ht/ft_htnew.c b/src/ht/ft_htnew.c
index f77398f..6827c36 100644
--- a/src/ht/ft_htnew.c
+++ b/src/ht/ft_htnew.c
@@ -6,7 +6,7 @@
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/01/30 08:19:16 by cacharle #+# #+# */
-/* Updated: 2020/02/28 12:10:51 by cacharle ### ########.fr */
+/* Updated: 2020/02/28 12:23:43 by cacharle ### ########.fr */
/* */
/* ************************************************************************** */
diff --git a/src/lst/ft_lstlfind.c b/src/lst/ft_lstlfind.c
index 92d37d8..c399b6e 100644
--- a/src/lst/ft_lstlfind.c
+++ b/src/lst/ft_lstlfind.c
@@ -5,8 +5,8 @@
/* +:+ +:+ +:+ */
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
-/* Created: 2020/02/17 03:04:52 by cacharle #+# #+# */
-/* Updated: 2020/02/19 02:03:11 by cacharle ### ########.fr */
+/* Created: 2020/02/27 18:00:37 by cacharle #+# #+# */
+/* Updated: 2020/02/28 12:24:05 by cacharle ### ########.fr */
/* */
/* ************************************************************************** */
diff --git a/src/lst/ft_lstlsearch.c b/src/lst/ft_lstlsearch.c
index 8d2acc8..f59b5de 100644
--- a/src/lst/ft_lstlsearch.c
+++ b/src/lst/ft_lstlsearch.c
@@ -5,8 +5,8 @@
/* +:+ +:+ +:+ */
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
-/* Created: 2020/02/17 02:57:12 by cacharle #+# #+# */
-/* Updated: 2020/02/17 03:35:45 by cacharle ### ########.fr */
+/* Created: 2020/02/27 16:18:33 by cacharle #+# #+# */
+/* Updated: 2020/02/28 12:24:31 by cacharle ### ########.fr */
/* */
/* ************************************************************************** */
diff --git a/src/util/ft_split_destroy.c b/src/util/ft_split_destroy.c
new file mode 100644
index 0000000..bc3f4e6
--- /dev/null
+++ b/src/util/ft_split_destroy.c
@@ -0,0 +1,24 @@
+/* ************************************************************************** */
+/* */
+/* ::: :::::::: */
+/* ft_split_destroy.c :+: :+: :+: */
+/* +:+ +:+ +:+ */
+/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
+/* +#+#+#+#+#+ +#+ */
+/* Created: 2020/02/27 16:30:55 by cacharle #+# #+# */
+/* Updated: 2020/02/27 17:52:31 by cacharle ### ########.fr */
+/* */
+/* ************************************************************************** */
+
+#include "libft_util.h"
+
+void *ft_split_destroy(char **strs)
+{
+ int i;
+
+ i = -1;
+ while (strs[++i] != NULL)
+ free(strs[i]);
+ free(strs);
+ return (NULL);
+}