Re: cvs: php-src(PHP_5_2) /ext/imap php_imap.c
| From: | Antony Dovgal | Date: | Fri, 16 Feb 2007 07:05:09 +0000 |
| Subject: | Re: cvs: php-src(PHP_5_2) /ext/imap php_imap.c | ||
| References: | 1 2 3 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-43085@lists.php.net to get a copy of this message | ||
On 02/16/2007 05:04 AM, Ilia Alshanetsky wrote:
What version of c-client are you using? For me here the code does not show any errors via valgrind 3.2.3.It's quite old, yes - imap-2004c. imap-2006d works ok in the same time. Ok, I found a solution, this patch fixes it: Index: ext/imap/php_imap.c =================================================================== RCS file: /repository/php-src/ext/imap/php_imap.c,v retrieving revision 1.208.2.7.2.17 diff -u -p -d -r1.208.2.7.2.17 php_imap.c
--- ext/imap/php_imap.c 13 Feb 2007 20:12:52 -0000 1.208.2.7.2.17+++ ext/imap/php_imap.c 16 Feb 2007 07:04:00 -0000 @@ -2215,7 +2215,7 @@ PHP_FUNCTION(imap_utf8)
if (dest.data) {
free(dest.data);
}
- if (src.data) {
+ if (src.data && src.data != dest.data) {
free(src.data);
}
}
In c-client sources they use similar if's.
--
Wbr,
Antony Dovgal