Loading ares/ares__get_hostent.c +4 −4 Original line number Diff line number Diff line Loading @@ -140,10 +140,10 @@ int ares__get_hostent(FILE *fp, struct hostent **host) memcpy(hostent->h_addr_list[0], &addr, sizeof(struct in_addr)); hostent->h_addr_list[1] = NULL; *host = hostent; if(line) free(line); return ARES_SUCCESS; } if(line) free(line); if (status == ARES_SUCCESS) Loading @@ -160,7 +160,7 @@ int ares__get_hostent(FILE *fp, struct hostent **host) } if(hostent->h_aliases) free(hostent->h_aliases); if (hostent->h_addr_list) if (hostent->h_addr_list && hostent->h_addr_list[0]) free(hostent->h_addr_list[0]); if(hostent->h_addr_list) free(hostent->h_addr_list); Loading Loading
ares/ares__get_hostent.c +4 −4 Original line number Diff line number Diff line Loading @@ -140,10 +140,10 @@ int ares__get_hostent(FILE *fp, struct hostent **host) memcpy(hostent->h_addr_list[0], &addr, sizeof(struct in_addr)); hostent->h_addr_list[1] = NULL; *host = hostent; if(line) free(line); return ARES_SUCCESS; } if(line) free(line); if (status == ARES_SUCCESS) Loading @@ -160,7 +160,7 @@ int ares__get_hostent(FILE *fp, struct hostent **host) } if(hostent->h_aliases) free(hostent->h_aliases); if (hostent->h_addr_list) if (hostent->h_addr_list && hostent->h_addr_list[0]) free(hostent->h_addr_list[0]); if(hostent->h_addr_list) free(hostent->h_addr_list); Loading