From: Dmitry Stogov Date: Wed, 9 Apr 2014 11:05:22 +0000 (+0400) Subject: Fixed reference counting X-Git-Tag: POST_PHPNG_MERGE~412^2~145 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=22ec682e77ed19d556b265880242d79f970a6363;p=php Fixed reference counting --- diff --git a/ext/standard/proc_open.c b/ext/standard/proc_open.c index f1f98e7101..a72184c7df 100644 --- a/ext/standard/proc_open.c +++ b/ext/standard/proc_open.c @@ -958,7 +958,8 @@ PHP_FUNCTION(proc_open) php_stream_to_zval(stream, &retfp); add_index_zval(pipes, descriptors[i].index, &retfp); - proc->pipes[i] = Z_RES_P(&retfp); + proc->pipes[i] = Z_RES(retfp); + Z_ADDREF(retfp); } break; default: