tran.c (85587) | tran.c (90902) |
---|---|
1/**************************************************************** 2Copyright (C) Lucent Technologies 1997 3All Rights Reserved 4 5Permission to use, copy, modify, and distribute this software and 6its documentation for any purpose and without fee is hereby 7granted, provided that the above copyright notice appear in all 8copies and that both that the copyright notice and this --- 156 unchanged lines hidden (view full) --- 165 return; 166 for (i = 0; i < tp->size; i++) { 167 for (cp = tp->tab[i]; cp != NULL; cp = temp) { 168 xfree(cp->nval); 169 if (freeable(cp)) 170 xfree(cp->sval); 171 temp = cp->cnext; /* avoids freeing then using */ 172 free(cp); | 1/**************************************************************** 2Copyright (C) Lucent Technologies 1997 3All Rights Reserved 4 5Permission to use, copy, modify, and distribute this software and 6its documentation for any purpose and without fee is hereby 7granted, provided that the above copyright notice appear in all 8copies and that both that the copyright notice and this --- 156 unchanged lines hidden (view full) --- 165 return; 166 for (i = 0; i < tp->size; i++) { 167 for (cp = tp->tab[i]; cp != NULL; cp = temp) { 168 xfree(cp->nval); 169 if (freeable(cp)) 170 xfree(cp->sval); 171 temp = cp->cnext; /* avoids freeing then using */ 172 free(cp); |
173 tp->nelem--; |
|
173 } 174 tp->tab[i] = 0; 175 } | 174 } 175 tp->tab[i] = 0; 176 } |
177 if (tp->nelem != 0) 178 WARNING("can't happen: inconsistent element count freeing %s", ap->nval); |
|
176 free(tp->tab); 177 free(tp); 178} 179 180void freeelem(Cell *ap, char *s) /* free elem s from ap (i.e., ap["s"] */ 181{ 182 Array *tp; 183 Cell *p, *prev = NULL; --- 207 unchanged lines hidden (view full) --- 391 392char *qstring(char *is, int delim) /* collect string up to next delim */ 393{ 394 char *os = is; 395 int c, n; 396 uschar *s = (uschar *) is; 397 uschar *buf, *bp; 398 | 179 free(tp->tab); 180 free(tp); 181} 182 183void freeelem(Cell *ap, char *s) /* free elem s from ap (i.e., ap["s"] */ 184{ 185 Array *tp; 186 Cell *p, *prev = NULL; --- 207 unchanged lines hidden (view full) --- 394 395char *qstring(char *is, int delim) /* collect string up to next delim */ 396{ 397 char *os = is; 398 int c, n; 399 uschar *s = (uschar *) is; 400 uschar *buf, *bp; 401 |
399 if ((buf = (uschar *) malloc(strlen(s)+3)) == NULL) | 402 if ((buf = (uschar *) malloc(strlen(is)+3)) == NULL) |
400 FATAL( "out of space in qstring(%s)", s); 401 for (bp = buf; (c = *s) != delim; s++) { 402 if (c == '\n') 403 SYNTAX( "newline in string %.20s...", os ); 404 else if (c != '\\') 405 *bp++ = c; 406 else { /* \something */ 407 c = *++s; --- 30 unchanged lines hidden --- | 403 FATAL( "out of space in qstring(%s)", s); 404 for (bp = buf; (c = *s) != delim; s++) { 405 if (c == '\n') 406 SYNTAX( "newline in string %.20s...", os ); 407 else if (c != '\\') 408 *bp++ = c; 409 else { /* \something */ 410 c = *++s; --- 30 unchanged lines hidden --- |