From 6d55e3456f5e3c3aa2d7469f43180fb4f23c3b99 Mon Sep 17 00:00:00 2001 From: Edin Kadribasic Date: Tue, 7 Jan 2003 11:24:17 +0000 Subject: [PATCH] MFB: Fixed bug #21442 (Crash of mail() on Windows when the first parameter is empty). --- win32/sendmail.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/win32/sendmail.c b/win32/sendmail.c index b0eb85dd842..97a1af9a14f 100644 --- a/win32/sendmail.c +++ b/win32/sendmail.c @@ -571,12 +571,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); }