mirror of
https://github.com/nmap/nmap.git
synced 2026-05-13 08:46:45 +00:00
Reuse strings for IPv6 OS detection probe IDs
This commit is contained in:
parent
478e156b04
commit
f44f255da3
2 changed files with 2 additions and 6 deletions
|
|
@ -2559,8 +2559,6 @@ FPProbe::FPProbe() {
|
|||
|
||||
|
||||
FPProbe::~FPProbe() {
|
||||
if (this->probe_id != NULL)
|
||||
free(this->probe_id);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -2570,8 +2568,6 @@ void FPProbe::reset() {
|
|||
this->times_replied = 0;
|
||||
this->failed = false;
|
||||
this->timed = false;
|
||||
if (this->probe_id != NULL)
|
||||
free(this->probe_id);
|
||||
this->probe_id = NULL;
|
||||
|
||||
/* Also call FPPacket::__reset() to free any existing packet information */
|
||||
|
|
@ -2601,7 +2597,7 @@ bool FPProbe::isResponse(PacketElement *rcvd) {
|
|||
* of the supplied string, so you can safely change its contents without
|
||||
* affecting the object's state. */
|
||||
int FPProbe::setProbeID(const char *id) {
|
||||
this->probe_id = strdup(id);
|
||||
this->probe_id = string_pool_insert(id);
|
||||
return OP_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue