Thread: [cvs] bogofilter/src textblock.c,1.8,1.9
Fast Bayesian spam filter along lines suggested by Paul Graham
Brought to you by:
m-a
From: <m-...@us...> - 2004-12-28 13:46:02
|
Update of /cvsroot/bogofilter/bogofilter/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10249/src Modified Files: textblock.c Log Message: Fix memory leak. Index: textblock.c =================================================================== RCS file: /cvsroot/bogofilter/bogofilter/src/textblock.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- textblock.c 31 Jan 2004 04:57:45 -0000 1.8 +++ textblock.c 28 Dec 2004 13:45:52 -0000 1.9 @@ -77,7 +77,8 @@ textdata_t *cur, *nxt; textblock_t *t = textblocks; - for (cur = t->head; (nxt = cur->next) != NULL; cur = nxt) { + for (cur = t->head; cur ; cur = nxt) { + nxt = cur->next; mem = cur->size + sizeof(*cur); cur_mem -= mem; if (DEBUG_TEXT(2)) fprintf(dbgout, "%s:%d %p %p %3lu *rel* cur: %lu, max: %lu, tot: %lu\n", |