freeing malloc and checkin it is empty or not
- by gcc
char *p;
p="kjkjk";
.
.//there are codes which are checking another command
.
if(.....)//i used pointer p in only that area
free(p);
.
. //there are codes which are checking another command
.
if(p==NULL) //i check whether is empty
....
if(p==-1) //can we use "EOF==p " in if statement
... //are there any usage like that EOF==p
else
....
I think there is big error , but where?