In order to free the memory, you need a pointer to the address of that memory. So you always need to keep a valid pointer to a dynamically allocated memory, otherwise, this memory will be "definitely lost", which means that the program will not be able to reuse the memory, since it will still be considered as allocated, even though you cannot access it anymore.
Yes you should, but not necessarily "p", since as mentioned previously, the p variable will not be valid anymore once you leave the function. For example, using the "foo" function that Subsonics posted, you could do like :
Code:
char *p2 = foo();
//do whatever you want with that pointer, and when not needed anymore :
free(p2);