]> granicus.if.org Git - php/commitdiff
Fixed bug #26847 (memory leak in mail() when to/subject contain only spaces)
authorIlia Alshanetsky <iliaa@php.net>
Fri, 9 Jan 2004 01:35:44 +0000 (01:35 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Fri, 9 Jan 2004 01:35:44 +0000 (01:35 +0000)
ext/standard/mail.c

index e9ef567de30226ede41c723e74eee7c24a742a1a..37973bbc139b093e63ee2914b4ee6b1fb0b6f47d 100644 (file)
@@ -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);
        }
 }