hello

if i had


NODE *first;
NODE *current;

current = first;

free(current);


will that erase first, or just the pointer to current?
and if i did free(first); then that will erase it right?

same thing with erasing a linked list, if i did

while(first->next!=NULL)
first=first->next

free(first)

that will end up erasing the list right?

now about string

if i had

char *mystring="blah\x00";

char *str2 = mystring;

free(str2);

i can still access mystring? like, will it only free the str2 pointer and not delete mystring?

im kinda confused about those, i think i have a few memory leaks in my program, i just wanna make sure so i dont go around freeing things that i shouldnt

thanks