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 @@ -6846,19 +6846,17 @@ PHP_FUNCTION(array_map)
68466846 } ZEND_HASH_FOREACH_END ();
68476847 }
68486848 } else {
6849- uint32_t * array_pos = (HashPosition * )ecalloc (n_arrays , sizeof (HashPosition ));
6850-
68516849 for (i = 0 ; i < n_arrays ; i ++ ) {
68526850 if (Z_TYPE (arrays [i ]) != IS_ARRAY ) {
68536851 zend_argument_type_error (i + 2 , "must be of type array, %s given" , zend_zval_value_name (& arrays [i ]));
6854- efree (array_pos );
68556852 RETURN_THROWS ();
68566853 }
68576854 if (zend_hash_num_elements (Z_ARRVAL (arrays [i ])) > maxlen ) {
68586855 maxlen = zend_hash_num_elements (Z_ARRVAL (arrays [i ]));
68596856 }
68606857 }
68616858
6859+ uint32_t * array_pos = ecalloc (n_arrays , sizeof (HashPosition ));
68626860 array_init_size (return_value , maxlen );
68636861
68646862 if (!ZEND_FCI_INITIALIZED (fci )) {
You can’t perform that action at this time.
0 commit comments