summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS5
-rwxr-xr-xext/pcntl/pcntl.c11
2 files changed, 8 insertions, 8 deletions
diff --git a/NEWS b/NEWS
index 0588b8358e..55c5629b70 100644
--- a/NEWS
+++ b/NEWS
@@ -49,10 +49,11 @@ PHP NEWS
- Added RFC2397 (data: stream) support. (Marcus)
- Fixed memory leaks in openssl streams context options (Pierre)
- Fixed handling of extremely long paths inside tempnam() function. (Ilia)
+- Fixed bug #37635 (parameter of pcntl signal handler is trashed). (Mike)
- Fixed bug #37632 (Protected method access problem). (Marcus)
-- Fixed bug #37616: DATE_RFC822 does not product RFC 822 dates. (Hannes
- Magnusson, Derick)
- Fixed bug #37620 (mysqli_ssl_set validation is innappropriate). (Georg)
+- Fixed bug #37616 (DATE_RFC822 does not product RFC 822 dates).
+ (Hannes Magnusson, Derick)
- Fixed bug #37614 (Class name lowercased in error message). (Johannes)
- Fixed bug #37587 (var without attribute causes segfault). (Marcus)
- Fixed bug #37586 (Bumped minimum PCRE version to 6.6, needed for recursion
diff --git a/ext/pcntl/pcntl.c b/ext/pcntl/pcntl.c
index 7705a287e0..8f18088948 100755
--- a/ext/pcntl/pcntl.c
+++ b/ext/pcntl/pcntl.c
@@ -693,16 +693,19 @@ void pcntl_tick_handler()
PCNTL_G(head) = NULL; /* simple stores are atomic */
/* Allocate */
- MAKE_STD_ZVAL(param);
- MAKE_STD_ZVAL(retval);
while (queue) {
if (zend_hash_index_find(&PCNTL_G(php_signal_table), queue->signo, (void **) &handle)==SUCCESS) {
+ MAKE_STD_ZVAL(retval);
+ MAKE_STD_ZVAL(param);
+ ZVAL_NULL(retval);
ZVAL_LONG(param, queue->signo);
/* Call php signal handler - Note that we do not report errors, and we ignore the return value */
/* FIXME: this is probably broken when multiple signals are handled in this while loop (retval) */
call_user_function(EG(function_table), NULL, *handle, retval, 1, &param TSRMLS_CC);
+ zval_ptr_dtor(&param);
+ zval_ptr_dtor(&retval);
}
next = queue->next;
@@ -713,10 +716,6 @@ void pcntl_tick_handler()
/* Re-enable queue */
PCNTL_G(processing_signal_queue) = 0;
-
- /* Clean up */
- efree(param);
- efree(retval);
}