cvs: php-src /ext/standard proc_open.c

From: Date: Sat, 12 Jul 2003 06:50:32 +0000
Subject: cvs: php-src /ext/standard proc_open.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-22517@lists.php.net to get a copy of this message
moriyoshi Sat Jul 12 02:50:32 2003 EDT Modified files: /php-src/ext/standard proc_open.c Log: Fixed leaks that occurs if the third parameter already contains a valid value. Index: php-src/ext/standard/proc_open.c diff -u php-src/ext/standard/proc_open.c:1.12 php-src/ext/standard/proc_open.c:1.13 --- php-src/ext/standard/proc_open.c:1.12 Tue Jun 10 16:03:38 2003 +++ php-src/ext/standard/proc_open.c Sat Jul 12 02:50:32 2003 @@ -15,7 +15,7 @@ | Author: Wez Furlong <wez@thebrainroom.com> | +----------------------------------------------------------------------+ */ -/* $Id: proc_open.c,v 1.12 2003/06/10 20:03:38 imajes Exp $ */ +/* $Id: proc_open.c,v 1.13 2003/07/12 06:50:32 moriyoshi Exp $ */ #include <stdio.h> #include "php.h" @@ -470,7 +470,7 @@ struct php_process_handle *proc; int is_persistent = 0; /* TODO: ensure that persistent procs will work */ - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "saz/|s!a!", &command, + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "saz|s!a!", &command, &command_len, &descriptorspec, &pipes, &cwd, &cwd_len, &environment) == FAILURE) { RETURN_FALSE; } @@ -737,6 +737,10 @@ proc->child = child; proc->env = env; + if (pipes != NULL) { + zval_dtor(pipes); + } + MAKE_STD_ZVAL(pipes); array_init(pipes); /* clean up all the child ends and then open streams on the parent

« previous php.cvs (#22517) next »