diff options
author | Robert James Kaes <rjkaes@users.sourceforge.net> | 2001-09-08 18:58:37 +0000 |
---|---|---|
committer | Robert James Kaes <rjkaes@users.sourceforge.net> | 2001-09-08 18:58:37 +0000 |
commit | 0668e42e8f5ce3d900218233e35de64905026cac (patch) | |
tree | 0a8f5ce953763cf81d78d51d31263712b9d8da1b /src/filter.c | |
parent | d5253ec5f435b26c50ca4cb649d3f47b800cbbd8 (diff) |
Changed all the mallocs and callocs to use the new safemalloc and
safecalloc.
Diffstat (limited to 'src/filter.c')
-rw-r--r-- | src/filter.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/filter.c b/src/filter.c index cda67e2..fa19440 100644 --- a/src/filter.c +++ b/src/filter.c @@ -1,4 +1,4 @@ -/* $Id: filter.c,v 1.4 2001-05-27 02:24:40 rjkaes Exp $ +/* $Id: filter.c,v 1.5 2001-09-08 18:58:37 rjkaes Exp $ * * Copyright (c) 1999 George Talusan (gstalusan@uwaterloo.ca) * @@ -54,11 +54,11 @@ void filter_init(void) s = buf; if (!p) /* head of list */ fl = p = (struct filter_list *) - malloc(sizeof + safemalloc(sizeof (struct filter_list)); else { /* next entry */ p->next = (struct filter_list *) - malloc(sizeof + safemalloc(sizeof (struct filter_list)); p = p->next; } @@ -71,7 +71,7 @@ void filter_init(void) *s = '\0'; p->pat = strdup(buf); - p->cpat = malloc(sizeof(regex_t)); + p->cpat = safemalloc(sizeof(regex_t)); if ((err = regcomp(p->cpat, p->pat, REG_NEWLINE | REG_NOSUB)) != 0) { fprintf(stderr, "Bad regex in %s: %s\n", |