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:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user