Let's say I used mallocto request free space. The variable ptrindicates the created memory space. In my code, the value is ptrchanged to access various locations in the allocated space.
The call free(ptr), after it has ptrbeen changed, will not be correct, no ?. Instead, I have to create a replica ptrafter malloc. This new pointer should be used instead in a function call free. Is it correct?
Greetings
source
share