From: Jaakko Heinonen Date: Wed, 15 Aug 2001 18:05:55 +0000 (+0000) Subject: Fixed a minor memory leak in pine import filter X-Git-Tag: upstream/0.6.1~2^2~351 X-Git-Url: https://git.deb.at/w?a=commitdiff_plain;h=7cae3af85f57515c6b6cce8ac45a986223e30736;p=pkg%2Fabook.git Fixed a minor memory leak in pine import filter --- diff --git a/ChangeLog b/ChangeLog index 0bdd7c3..139cc98 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ 0.4.14 - minor html filter update + - fixed a minor memory leak in pine import filter 0.4.13 - major code reorganization (phase 1) diff --git a/filter.c b/filter.c index 5aa148c..99d01a2 100644 --- a/filter.c +++ b/filter.c @@ -900,7 +900,7 @@ pine_convert_emails(char *s) *tmp=0; for(i=1; ( tmp = strchr(s, ',') ) != NULL ; i++, s=tmp+1 ) - if( i > 3 ) { + if( i > MAX_EMAILS - 1 ) { *tmp = 0; break; } @@ -966,8 +966,10 @@ pine_parse_file(FILE *in) strcat(buf, ptr); } - if( *buf == '#' ) + if( *buf == '#' ) { + my_free(buf); continue; + } pine_fixbuf(buf); pine_parse_buf(buf);