Browse Source

Need to close on premature abort too or resources are leaked.

Adam Ierymenko 9 years ago
parent
commit
1e213b4d4c
1 changed files with 1 additions and 0 deletions
  1. 1 0
      osdep/PortMapper.cpp

+ 1 - 0
osdep/PortMapper.cpp

@@ -120,6 +120,7 @@ public:
 #ifdef ZT_PORTMAPPER_TRACE
 #ifdef ZT_PORTMAPPER_TRACE
 						fprintf(stderr,"PortMapper: NAT-PMP: request for external address failed, aborting..."ZT_EOL_S);
 						fprintf(stderr,"PortMapper: NAT-PMP: request for external address failed, aborting..."ZT_EOL_S);
 #endif
 #endif
+						closenatpmp(&natpmp);
 						break;
 						break;
 					}
 					}