File tree Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -6853,19 +6853,17 @@ PHP_FUNCTION(array_map)
68536853 } ZEND_HASH_FOREACH_END ();
68546854 }
68556855 } else {
6856- uint32_t * array_pos = (HashPosition * )ecalloc (n_arrays , sizeof (HashPosition ));
6857-
68586856 for (i = 0 ; i < n_arrays ; i ++ ) {
68596857 if (Z_TYPE (arrays [i ]) != IS_ARRAY ) {
68606858 zend_argument_type_error (i + 2 , "must be of type array, %s given" , zend_zval_value_name (& arrays [i ]));
6861- efree (array_pos );
68626859 RETURN_THROWS ();
68636860 }
68646861 if (zend_hash_num_elements (Z_ARRVAL (arrays [i ])) > maxlen ) {
68656862 maxlen = zend_hash_num_elements (Z_ARRVAL (arrays [i ]));
68666863 }
68676864 }
68686865
6866+ uint32_t * array_pos = ecalloc (n_arrays , sizeof (HashPosition ));
68696867 array_init_size (return_value , maxlen );
68706868
68716869 if (!ZEND_FCI_INITIALIZED (fci )) {
You can’t perform that action at this time.
0 commit comments