mirror of
https://github.com/nmap/nmap.git
synced 2026-01-21 21:59:08 +00:00
Adding a couple free()s when having an early return in l_port_accessor() in nse_nmaplib.cc. Coverity (CID 32) found function_name, I added target_ip.
This commit is contained in:
@@ -307,8 +307,11 @@ static int l_port_accessor(lua_State* l) {
|
||||
}
|
||||
|
||||
// if the port wasn't scanned we return nil
|
||||
if(port == NULL)
|
||||
if(port == NULL) {
|
||||
free(target_ip);
|
||||
free(function_name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if(strcmp(function_name, "set_port_state") == MATCH)
|
||||
retvalues = l_set_port_state(l, target, port);
|
||||
|
||||
Reference in New Issue
Block a user