From 6bf4579f829d1564fdb7b4519e3da6b20827882d Mon Sep 17 00:00:00 2001 From: Antony Dovgal Date: Tue, 5 Sep 2006 11:24:23 +0000 Subject: [PATCH] fix it in an other way --- ext/imap/php_imap.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c index b6b9731c9e..9d4db8ac98 100644 --- a/ext/imap/php_imap.c +++ b/ext/imap/php_imap.c @@ -2174,7 +2174,10 @@ PHP_FUNCTION(imap_utf8) cpytxt(&src, Z_STRVAL_PP(str), Z_STRLEN_PP(str)); utf8_mime2text(&src, &dest); - RETURN_STRINGL(dest.data, dest.size, 0); + RETVAL_STRINGL(dest.data, dest.size, 1); + if (dest.data) { + free(dest.data); + } } /* }}} */ -- 2.50.1