| Line | Branch | Exec | Source | 
|---|---|---|---|
| 1 | /* | ||
| 2 | ** EPITECH PROJECT, 2024 | ||
| 3 | ** my_free_ptr | ||
| 4 | ** File description: | ||
| 5 | ** Free a pointer (ptr) and set it to NULL | ||
| 6 | */ | ||
| 7 | /** | ||
| 8 | * @file my_free_ptr.c | ||
| 9 | * @brief The file containing the my_free_ptr function | ||
| 10 | * @author Nicolas TORO | ||
| 11 | */ | ||
| 12 | |||
| 13 | #include "my.h" | ||
| 14 | |||
| 15 | 260 | void *my_free_ptr(void *ptr) | |
| 16 | { | ||
| 17 | 3/4✓ Branch 0 taken 259 times. ✓ Branch 1 taken 1 times. ✗ Branch 2 not taken. ✓ Branch 3 taken 259 times. | 260 | if (ptr == NULL || !ptr) | 
| 18 | 1 | return NULL; | |
| 19 | 259 | free(ptr); | |
| 20 | 259 | ptr = NULL; | |
| 21 | 259 | return NULL; | |
| 22 | } | ||
| 23 |