In C, you cannot and cannot release pointers. Pointers are ordinary scalar variables. There you can do nothing in terms of “liberation” or something like that.
What can be "freed" is the memory pointed to by the pointer. But in C, you need to free memory that has been explicitly allocated by malloc / calloc / realloc . Such memory is freed up when calling free .
Please note that in your program you may have several (hundreds) of pointers pointing to the same block of allocated memory. In the end, you will have to free this block of memory. But no matter how many pointers you point to this block, you need to free this block of memory exactly once. It is your responsibility to release it. And you are responsible for ensuring that you release it exactly once. I am telling you this simply to illustrate the fact that you are releasing a block of memory, not pointers.
In your example, your pointer points to a block of memory that has never been allocated by any of the above functions. This immediately means you don't have to let go of anything.
source share