mirror of
https://github.com/nmap/nmap.git
synced 2025-12-30 11:29:01 +00:00
memory releasing patch from Marek
This commit is contained in:
10
charpool.cc
10
charpool.cc
@@ -122,6 +122,16 @@ static int cp_init(void) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void cp_free(void) {
|
||||
int ccp;
|
||||
for(ccp=0; ccp <= currentcharpool; ccp++)
|
||||
if(charpool[ccp]){
|
||||
free(charpool[ccp]);
|
||||
charpool[ccp] = NULL;
|
||||
}
|
||||
currentcharpool = 0;
|
||||
}
|
||||
|
||||
static inline void cp_grow(void) {
|
||||
/* Doh! We've got to make room */
|
||||
if (++currentcharpool > 15) {
|
||||
|
||||
Reference in New Issue
Block a user