My question is why i have to assign NULL to pointer after freeing allocated memory?
free(*ptr);
*ptr = NULL;
I mean situation like this, why it is necesssary?
My question is why i have to assign NULL to pointer after freeing allocated memory?
free(*ptr);
*ptr = NULL;
I mean situation like this, why it is necesssary?