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, ¶m TSRMLS_CC);
+ zval_ptr_dtor(¶m);
+ zval_ptr_dtor(&retval);
}
next = queue->next;
/* Re-enable queue */
PCNTL_G(processing_signal_queue) = 0;
-
- /* Clean up */
- efree(param);
- efree(retval);
}