]> granicus.if.org Git - php/commitdiff
fix it in an other way
authorAntony Dovgal <tony2001@php.net>
Tue, 5 Sep 2006 11:24:23 +0000 (11:24 +0000)
committerAntony Dovgal <tony2001@php.net>
Tue, 5 Sep 2006 11:24:23 +0000 (11:24 +0000)
ext/imap/php_imap.c

index b6b9731c9e7a7c4f1ea2d9153b7235e6c9c3d982..9d4db8ac987190fafc25c0fb22523fd93795d1ef 100644 (file)
@@ -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);
+       }
 }
 /* }}} */