From: Xinchen Hui Date: Thu, 31 Jul 2014 10:15:47 +0000 (+0800) Subject: Fixed valgrind issues X-Git-Tag: POST_PHPNG_MERGE~42 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=238a3167e601dd74772182e354298578c1c50021;p=php Fixed valgrind issues --- diff --git a/ext/intl/collator/collator_convert.c b/ext/intl/collator/collator_convert.c index 3f5dd3ae66..e1ec3b1631 100644 --- a/ext/intl/collator/collator_convert.c +++ b/ext/intl/collator/collator_convert.c @@ -63,9 +63,11 @@ static void collator_convert_hash_item_from_utf8_to_utf16( return; /* Update current hash item with the converted value. */ - ZVAL_STRINGL( &znew_val, (char*)new_val, UBYTES(new_val_len) ); + ZVAL_STRINGL( &znew_val, (char*)new_val, UBYTES(new_val_len + 1) ); //??? efree(new_val); + /* hack to fix use of initialized value */ + Z_STRLEN(znew_val) = Z_STRLEN(znew_val) - UBYTES(1); if( hashKey) { diff --git a/ext/intl/transliterator/transliterator_methods.c b/ext/intl/transliterator/transliterator_methods.c index 25edd005ef..4403de08aa 100644 --- a/ext/intl/transliterator/transliterator_methods.c +++ b/ext/intl/transliterator/transliterator_methods.c @@ -463,7 +463,7 @@ cleanup: RETVAL_FALSE; } - zval_ptr_dtor( &tmp_object ); + /* zval_ptr_dtor( &tmp_object ); */ } /* }}} */