Boy, it's been a few days of crazy free() trips here for me...
Anyway, when I do this:
Both these free() calls cause a double-free/corruption error, which means I cannot free the memory allocated to either struct?Code:int main () { struct in_addr *address=malloc(sizeof(struct in_addr)); struct hostent *test=malloc(sizeof(struct hostent)); if ((test==NULL) || (address==NULL)) exit (-1); [...struct are both filled and used] free(address); free(&test); // alt version