-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdouble_pointer_free.c
More file actions
24 lines (21 loc) · 1.01 KB
/
double_pointer_free.c
File metadata and controls
24 lines (21 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* double_pointer_free.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mamoussa <mamoussa@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/11/13 16:52:11 by mamoussa #+# #+# */
/* Updated: 2020/12/10 11:39:04 by mamoussa ### ########.fr */
/* */
/* ************************************************************************** */
#include "shell.h"
void double_pointer_free(char **ptr)
{
size_t i;
i = 0;
while (ptr[i])
free(ptr[i++]);
free(ptr);
ptr = NULL;
}