From: Ilia Alshanetsky Date: Sun, 6 Feb 2005 22:58:46 +0000 (+0000) Subject: Fixed possible un-initialized var on error. X-Git-Tag: RELEASE_0_2~49 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=917648a232f4119c70ccd61a5675fb93a756128f;p=php Fixed possible un-initialized var on error. --- diff --git a/ext/standard/exec.c b/ext/standard/exec.c index 11bb365f65..1dbd638b52 100644 --- a/ext/standard/exec.c +++ b/ext/standard/exec.c @@ -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);