Hi
Please excuse my ignorance - what happens in the following code?
char *trim(char *str)
{
return (str + 3);
}
void f()
{
char *str = strdup("1234567890");
str = trim(str);
// Do other stuff
free(str);
return;
}
Basically, I'm free()-ing an address which is different from the one I
malloc()-ed.
Thanks.
Biswa.