1
0
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:
fyodor
2006-07-04 23:04:56 +00:00
parent 41aad8638a
commit 9c0af0a95b
21 changed files with 312 additions and 71 deletions

View File

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