/[imapfilter]/imapfilter/file.c
ViewVC logotype

Diff of /imapfilter/file.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.22 by lefcha, Sat Oct 6 13:16:28 2001 UTC revision 1.23 by lefcha, Sat Oct 6 13:43:11 2001 UTC
# Line 24  int read_config(char *cfg) Line 24  int read_config(char *cfg)
24      int r;      int r;
25      FILE *fp;      FILE *fp;
26      char *home = NULL;      char *home = NULL;
27        char *c = NULL;
28        
29      if (!cfg) {      if (!cfg) {
30          cfg = (char *) xmalloc(PATH_MAX * sizeof(char));          cfg = c = (char *) xmalloc(PATH_MAX * sizeof(char));
31    
32          home = getenv("HOME");          home = getenv("HOME");
33    
# Line 44  int read_config(char *cfg) Line 45  int read_config(char *cfg)
45          fatal(ERROR_FILE_OPEN, "imapfilter: opening config file %s; %s\n",          fatal(ERROR_FILE_OPEN, "imapfilter: opening config file %s; %s\n",
46                cfg, strerror(errno));                cfg, strerror(errno));
47    
48        if (c)
49            free(c);
50    
51      if ((r = parse_config(fp)))      if ((r = parse_config(fp)))
52          fatal(ERROR_CONFIG_PARSE,          fatal(ERROR_CONFIG_PARSE,
53                "imapfilter: parse error in config file at row %d\n", r);                "imapfilter: parse error in config file at row %d\n", r);
54    
55      fclose(fp);      fclose(fp);
       
     if (!cfg)  
         free(cfg);  
56    
57  #ifdef DEBUG  #ifdef DEBUG
58      printf("debug: options: %0#10x\n", options);      printf("debug: options: %0#10x\n", options);

Legend:
Removed from v.1.22  
changed lines
  Added in v.1.23

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26