Changeset 176

Show
Ignore:
Timestamp:
28/04/07 15:43:25 (19 months ago)
Author:
smoku
Message:

Exit memleak in c2s patch by amd//store20.com. Fixes #67

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/c2s/main.c

    r162 r176  
    517517    _c2s_pidfile(c2s); 
    518518 
    519     if(c2s->ar_module_name == NULL) 
    520     { 
     519    if(c2s->ar_module_name == NULL) { 
    521520        log_write(c2s->log, LOG_ERR, "no authreg module specified in config file"); 
     521        access_free(c2s->access); 
     522        config_free(c2s->config); 
     523        log_free(c2s->log); 
     524        free(c2s); 
    522525        exit(1); 
    523526    } 
    524527 
    525     if((c2s->ar = authreg_init(c2s, c2s->ar_module_name)) == NULL) 
     528    if((c2s->ar = authreg_init(c2s, c2s->ar_module_name)) == NULL) { 
     529        access_free(c2s->access); 
     530        config_free(c2s->config); 
     531        log_free(c2s->log); 
     532        free(c2s); 
    526533        exit(1); 
     534        } 
    527535 
    528536    c2s->pc = prep_cache_new();