mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Fixed possible un-initialized var on error.
This commit is contained in:
parent
c3eae192dc
commit
917648a232
1 changed files with 4 additions and 2 deletions
|
@ -66,7 +66,7 @@ int php_exec(int type, char *cmd, pval *array, pval *return_value TSRMLS_DC)
|
|||
php_stream *stream;
|
||||
size_t buflen, bufl = 0;
|
||||
#if PHP_SIGCHILD
|
||||
void (*sig_handler)();
|
||||
void (*sig_handler)() = NULL;
|
||||
#endif
|
||||
|
||||
if (PG(safe_mode)) {
|
||||
|
@ -177,7 +177,9 @@ int php_exec(int type, char *cmd, pval *array, pval *return_value TSRMLS_DC)
|
|||
|
||||
done:
|
||||
#if PHP_SIGCHILD
|
||||
signal (SIGCHLD, sig_handler);
|
||||
if (sig_handler) {
|
||||
signal(SIGCHLD, sig_handler);
|
||||
}
|
||||
#endif
|
||||
if (d) {
|
||||
efree(d);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue