summaryrefslogtreecommitdiff
path: root/ext/standard/mail.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2004-01-09 01:35:44 +0000
committerIlia Alshanetsky <iliaa@php.net>2004-01-09 01:35:44 +0000
commit2736c55e3e6cf2bcb21dbb161a4afcd557ffdc92 (patch)
tree4bf667a4eab7323d0ec8f41d6bf80b9811994485 /ext/standard/mail.c
parent47c81de40f8a8cd7b7c9d162db366c332296df4d (diff)
downloadphp-git-2736c55e3e6cf2bcb21dbb161a4afcd557ffdc92.tar.gz
Fixed bug #26847 (memory leak in mail() when to/subject contain only spaces)
Diffstat (limited to 'ext/standard/mail.c')
-rw-r--r--ext/standard/mail.c4
1 files 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);
}
}