Any problem ?

ratheesh k <[email protected]> Fri, 28 Jan 2011 17:23:43 +0530
Newsgroups org.kernel.vger.linux-c-programming
Message-ID <[email protected]>
Is there any problem with this below code ? I just want to free memory.


void free_it(char *ptr)
{
 free(ptr);
}


int main()
{
char *str = (char *)malloc(100);
strcpy(str, "Ratheesh");
free_it(str);
str=NULL;
return 0;
}