mirror of
https://github.com/nmap/nmap.git
synced 2026-05-13 08:46:45 +00:00
Use string_pool for service names so they aren't freed by Lua. See #2657
This commit is contained in:
parent
2da490f847
commit
38c113f820
2 changed files with 4 additions and 3 deletions
|
|
@ -64,7 +64,7 @@
|
|||
#include "services.h"
|
||||
#include "protocols.h"
|
||||
#include "NmapOps.h"
|
||||
#include "charpool.h"
|
||||
#include "string_pool.h"
|
||||
#include "nmap_error.h"
|
||||
#include "utils.h"
|
||||
|
||||
|
|
@ -231,7 +231,7 @@ static int nmap_services_init() {
|
|||
sn.s_name = NULL;
|
||||
}
|
||||
else {
|
||||
sn.s_name = cp_strdup(servicename);
|
||||
sn.s_name = string_pool_insert(servicename);
|
||||
}
|
||||
sn.s_port = portno;
|
||||
sn.s_proto = npe->p_name;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue