Possible Duplicate:
Function Free() in C doesn't work
I just asked a question about free(), check the link below. If I can’t use if(pointer != NULL), then what can I use, just in case it doesn’t work because of a stupid mistake I made.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Whenever you free a pointer you should set it to null – then you can use your test safetly
You could even create your own free function so you dont forget to set to null.