Timeline for Problem with char* variable malloc/free. Empty contents on recipient variable after using free
Current License: CC BY-SA 4.0
4 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| May 11, 2024 at 17:53 | vote | accept | Daniel Melendrez | ||
| May 10, 2024 at 9:48 | comment | added | KIIV |
@DanielMelendrez If you are allocating pointer, you have to free it when it's no longer needed. Problem in your code isn't not freeing it as it's been already freed and pointer in fileToDelete.fileName is invalid
|
|
| May 10, 2024 at 9:25 | comment | added | Daniel Melendrez | Thank you for your detailed and professional response. It makes absolute sense to me now. This "issue" is part of a massive project that has been mentally draining me and I am not thinking clearly. As it seems, not freeing up the pointer shouldn't be a problem then. | |
| May 10, 2024 at 2:40 | history | answered | Delta_G | CC BY-SA 4.0 |