summaryrefslogtreecommitdiff
path: root/lang/php5/patches/patch-as
blob: aa8ec604ccac49e231161363ae9763fcfce9c8fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
$NetBSD: patch-as,v 1.3.20.1 2009/02/26 13:43:59 tron Exp $

Fix memory leak and pullup bug fix for http://bugs.php.net/bug.php?id=46918

Remove this patch when PHP >= 5.2.9 is released as it will contain these
changes

--- ext/imap/php_imap.c.orig	2009-02-24 17:45:27.000000000 +0000
+++ ext/imap/php_imap.c	2009-02-24 17:47:14.000000000 +0000
@@ -2172,7 +2172,7 @@
 
 	/* rfc822_parse_adrlist() modifies passed string. Copy it. */
 	str_copy = estrndup(Z_STRVAL_PP(str), Z_STRLEN_PP(str));
-	rfc822_parse_adrlist(&env->to, str_copy, defaulthost);
+	rfc822_parse_adrlist(&env->to, str_copy, Z_STRVAL_PP(defaulthost));
 	efree(str_copy);
 
 	array_init(return_value);
@@ -2196,6 +2196,8 @@
 		}
 		add_next_index_object(return_value, tovals TSRMLS_CC);
 	} while ((addresstmp = addresstmp->next));
+	
+	mail_free_envelope(&env);
 }
 /* }}} */