diff --git a/ext/standard/mail.c b/ext/standard/mail.c index e9ef567de30..37973bbc139 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); } }