diff options
Diffstat (limited to 'ext/imap/php_imap.c')
-rw-r--r-- | ext/imap/php_imap.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c index dcaa200ead..a4e7b7ae0f 100644 --- a/ext/imap/php_imap.c +++ b/ext/imap/php_imap.c @@ -2178,7 +2178,10 @@ PHP_FUNCTION(imap_utf8) cpytxt(&src, Z_STRVAL_PP(str), Z_STRLEN_PP(str)); utf8_mime2text(&src, &dest); - RETURN_STRINGL(dest.data, strlen(dest.data), 1); + RETVAL_STRINGL(dest.data, dest.size, 1); + if (dest.data) { + free(dest.data); + } } /* }}} */ |