1
0
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:
kris
2007-11-16 02:20:09 +00:00
parent 3bb4599edd
commit 7f1654e3ac

View File

@@ -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);