I have some legacy code that I have a question about. A pointer to allocated memory is passed as a parameter to a function. In the function, there is a declaration statement that creates a new pointer and assigns it the value of the allocated pointer. Will the free() statement actually free the allocated memory?
Thanks.
Code:void test(int *intptr) { int* newptr = intptr; . . . . free(newptr); }