1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-24 07:09:01 +00:00

Remove test against memory returned by safe_zalloc() in TraceProbe::nameIP() in traceroute.cc. The safe_* memory functions never return NULL.

This commit is contained in:
kris
2007-04-13 16:28:13 +00:00
parent 6e2229e0a5
commit 8d97612842

View File

@@ -1324,10 +1324,7 @@ TraceProbe::~TraceProbe () {
}
const char *TraceProbe::nameIP(void) {
if((hostnameip = (char *) safe_zalloc(NAMEIPLEN)) == NULL) {
perror("traceroute malloc()");
return NULL;
}
hostnameip = (char *) safe_zalloc(NAMEIPLEN);
if(hostname == NULL || *hostname == NULL)
snprintf(hostnameip, NAMEIPLEN, "%s", inet_ntoa(ipreplysrc));