From 2736c55e3e6cf2bcb21dbb161a4afcd557ffdc92 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Fri, 9 Jan 2004 01:35:44 +0000 Subject: [PATCH] Fixed bug #26847 (memory leak in mail() when to/subject contain only spaces) --- ext/standard/mail.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/standard/mail.c b/ext/standard/mail.c index e9ef567de3..37973bbc13 100644 --- a/ext/standard/mail.c +++ b/ext/standard/mail.c @@ -160,10 +160,10 @@ PHP_FUNCTION(mail) if (extra_cmd) { efree (extra_cmd); } - if (to_len > 0) { + if (to_r != to) { efree(to_r); } - if (subject_len > 0) { + if (subject_r != subject) { efree(subject_r); } } -- 2.40.0