Changeset 298

Show
Ignore:
Timestamp:
02/15/07 12:46:24 (1 year ago)
Author:
bart
Message:

Use emalloc for filter lists, mixing memory from two allocators is enough.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • eaccelerator/trunk/ChangeLog

    r297 r298  
     12007-02-15  Bart Vanbrabant <bart.vanbrabant at zoeloelip.be> 
     2 
     3        * Use emalloc for filter lists, mixing memory from two allocators is  
     4          enough. 
     5 
    162007-02-13  Bart Vanbrabant <bart.vanbrabant at zoeloelip.be> 
    27 
  • eaccelerator/trunk/eaccelerator.c

    r296 r298  
    703703      unlink(s); 
    704704      if (use_shm) eaccelerator_free(p); else efree(p); 
     705                        DBG(ea_debug_printf, (EA_DEBUG, "cache file is corrupted\n")); 
    705706      return NULL; 
    706707    } 
     
    15351536    q = p->next; 
    15361537    if (p->str) { 
    1537       free(p->str); 
    1538     } 
    1539     free(p); 
     1538      efree(p->str); 
     1539    } 
     1540    efree(p); 
    15401541  } 
    15411542  EAG(cond_list) = NULL; 
     
    15551556      ; 
    15561557    if ((s > ss) && *ss) { 
    1557       p = (ea_cond_entry *)malloc(sizeof(ea_cond_entry)); 
     1558      p = (ea_cond_entry *)emalloc(sizeof(ea_cond_entry)); 
    15581559      if (p == NULL) 
    15591560        break; 
    15601561      p->not = not; 
    15611562      p->len = s-ss; 
    1562       p->str = malloc(p->len+1); 
     1563      p->str = emalloc(p->len+1); 
    15631564      memcpy(p->str, ss, p->len); 
    15641565      p->str[p->len] = 0; 
     
    17991800    q = p->next; 
    18001801    if (p->str) { 
    1801       free(p->str); 
    1802     } 
    1803     free(p); 
     1802      efree(p->str); 
     1803    } 
     1804    efree(p); 
    18041805  } 
    18051806  eaccelerator_globals->cond_list = NULL;