Use serviceDeductions::erase() and not constructor to reset the object.

This commit is contained in:
dmiller 2026-04-16 23:36:49 +00:00
parent 53e6be8f28
commit 782f59634e

View file

@ -267,7 +267,7 @@ void PortList::getServiceDeductions(u16 portno, int protocol, struct serviceDedu
const struct nservent *service;
/* Look up the service name. */
*sd = serviceDeductions();
sd->erase();
service = nmap_getservbyport(portno, protocol);
if (service != NULL)
sd->name = service->s_name;