mirror of
https://github.com/nmap/nmap.git
synced 2026-06-20 07:29:59 +00:00
Fix code style in PortList::freePortMap.
This commit is contained in:
parent
a42ea72a97
commit
e32a406032
1 changed files with 5 additions and 4 deletions
|
|
@ -724,13 +724,14 @@ int PortList::forgetPort(u16 portno, u8 protocol) {
|
|||
|
||||
/* Just free memory used by PortList::port_map[]. Should be done somewhere
|
||||
* before closing nmap. */
|
||||
void PortList::freePortMap(){
|
||||
void PortList::freePortMap() {
|
||||
int proto;
|
||||
for(proto=0; proto < PORTLIST_PROTO_MAX; proto++) {
|
||||
if(port_map[proto]){
|
||||
|
||||
for (proto=0; proto < PORTLIST_PROTO_MAX; proto++) {
|
||||
if (port_map[proto]) {
|
||||
free(port_map[proto]);
|
||||
port_map[proto] = NULL;
|
||||
}
|
||||
}
|
||||
if (port_map_rev[proto]) {
|
||||
free(port_map_rev[proto]);
|
||||
port_map_rev[proto] = NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue