From: Edin Kadribasic Date: Tue, 7 Jan 2003 11:20:50 +0000 (+0000) Subject: Fixed bug #21442 (Crash of mail() on Windows when the first parameter X-Git-Tag: PHP_4_3_before_13561_fix~106 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8b5cb40c241e7e13c13390ce9a98119a3a1d12dd;p=php Fixed bug #21442 (Crash of mail() on Windows when the first parameter is empty). --- diff --git a/win32/sendmail.c b/win32/sendmail.c index 5a8c7276d3..51eb9410c2 100644 --- a/win32/sendmail.c +++ b/win32/sendmail.c @@ -548,12 +548,16 @@ int SendText(char *RPath, char *Subject, char *mailTo, char *mailCc, char *mailB } if ((res = Post("DATA\r\n")) != SUCCESS) { - efree(stripped_header); + if (stripped_header) { + efree(stripped_header); + } return (res); } if ((res = Ack(&server_response)) != SUCCESS) { SMTP_ERROR_RESPONSE(server_response); - efree(stripped_header); + if (stripped_header) { + efree(stripped_header); + } return (res); }