From: Erik Hovland Date: Mon, 6 Apr 2009 17:10:35 +0000 (+0200) Subject: mutt_message_to_7bit(): Only close file pointer if we opened it X-Git-Tag: mutt-1-5-20-rel~125 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=55b24d5300049d2cbf13a7c9428815cf14c9126d;p=mutt mutt_message_to_7bit(): Only close file pointer if we opened it The pointer is to be managed outside the function and provided. Only close it we opened it ourself using fopen(). --- diff --git a/ChangeLog b/ChangeLog index 60d54e68..2cd9f82f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-04-06 19:07 +0200 Erik Hovland (b5cbd0dab863) + + * sendlib.c: Plug memory leaks in sendlib.c + 2009-04-05 13:41 +0200 Rocco Rutte (5d393e716c51) * ChangeLog, init.h, sendlib.c: Backed out changeset 23c7b469ff20 diff --git a/sendlib.c b/sendlib.c index e7f014a8..64d21b76 100644 --- a/sendlib.c +++ b/sendlib.c @@ -1070,7 +1070,7 @@ void mutt_message_to_7bit (BODY *a, FILE *fp) cleanup: FREE (&line); - if (fpin && !fp) + if (fpin && fpin != fp) safe_fclose (&fpin); if (fpout) safe_fclose (&fpout);