>> Second: I'm currently debugging a strange memory corruption problem >> and >> have just had a look at the gethostbyname2.c code: >> >> I was wondering: why is it safe to do free(h) on the initial run when >> *h has not been >> >> static struct hostent *h; >> size_t size = 63; >> struct hostent *res; >> int err; >> do { >> free(h); >> >> Best regards, >> >> Pirmin h is defined as having static storage, as such its initial value is NULL. free(NULL) is valid. - Shiz