]> git.deb.at Git - pkg/abook.git/commitdiff
Fixed a minor memory leak in pine import filter
authorJaakko Heinonen <jheinonen@users.sourceforge.net>
Wed, 15 Aug 2001 18:05:55 +0000 (18:05 +0000)
committerJaakko Heinonen <jheinonen@users.sourceforge.net>
Wed, 15 Aug 2001 18:05:55 +0000 (18:05 +0000)
ChangeLog
filter.c

index 0bdd7c35a8b03a2a67e8172413a5a1776999efd9..139cc988032d15b787340847501baaa0eb787f6c 100644 (file)
--- 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)
index 5aa148cf9a54629b3c27620c16a9bd3120b984dd..99d01a2b5b9c39d7084cd9cd1c2e9c8c6f5bed38 100644 (file)
--- 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);