Skip to content

Commit 7320abb

Browse files
committed
Reverted "efree(args);" removed by mistake
1 parent 50d899d commit 7320abb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ext/standard/array.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4316,6 +4316,7 @@ PHP_FUNCTION(array_map)
43164316
for (i = 0; i < n_arrays; i++) {
43174317
if (Z_TYPE(arrays[i]) != IS_ARRAY) {
43184318
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Argument #%d should be an array", i + 2);
4319+
efree(args);
43194320
efree(array_len);
43204321
efree(array_pos);
43214322
return;
@@ -4335,6 +4336,7 @@ PHP_FUNCTION(array_map)
43354336
RETVAL_ZVAL(args[0], 1, 0);
43364337
efree(array_len);
43374338
efree(array_pos);
4339+
efree(args);
43384340
return;
43394341
}
43404342

@@ -4386,6 +4388,7 @@ PHP_FUNCTION(array_map)
43864388
if (zend_call_function(&fci, &fci_cache TSRMLS_CC) != SUCCESS || Z_TYPE(result) == IS_UNDEF) {
43874389
php_error_docref(NULL TSRMLS_CC, E_WARNING, "An error occurred while invoking the map callback");
43884390
efree(array_len);
4391+
efree(args);
43894392
efree(array_pos);
43904393
zval_dtor(return_value);
43914394
efree(params);
@@ -4408,6 +4411,7 @@ PHP_FUNCTION(array_map)
44084411
efree(params);
44094412
efree(array_len);
44104413
efree(array_pos);
4414+
efree(args);
44114415
}
44124416
/* }}} */
44134417

0 commit comments

Comments
 (0)