| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | /* | ||
| 2 | ** EPITECH PROJECT, 2024 | ||
| 3 | ** my_free_array | ||
| 4 | ** File description: | ||
| 5 | ** Free an array (array) | ||
| 6 | */ | ||
| 7 | /** | ||
| 8 | * @file my_free_array.c | ||
| 9 | * @brief The file containing the my_free_array function | ||
| 10 | * @author Nicolas TORO | ||
| 11 | */ | ||
| 12 | |||
| 13 | #include "my.h" | ||
| 14 | |||
| 15 | 2 | void my_free_array(void **array) | |
| 16 | { | ||
| 17 |
2/2✓ Branch 0 taken 1 times.
✓ Branch 1 taken 1 times.
|
2 | if (array == NULL) |
| 18 | 1 | return; | |
| 19 |
2/2✓ Branch 0 taken 4 times.
✓ Branch 1 taken 1 times.
|
5 | for (int i = 0; array[i] != NULL; i++) |
| 20 | 4 | FREE(array[i]); | |
| 21 | 1 | FREE(array); | |
| 22 | } | ||
| 23 |