tony2001 Fri Jul 11 12:40:28 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/main/streams streams.c Log: MFH http://cvs.php.net/viewvc.cgi/php-src/main/streams/streams.c?r1=1.82.2.6.2.18.2.11&r2=1.82.2.6.2.18.2.12&diff_format=u Index: php-src/main/streams/streams.c diff -u php-src/main/streams/streams.c:1.82.2.6.2.18.2.11 php-src/main/streams/streams.c:1.82.2.6.2.18.2.12 --- php-src/main/streams/streams.c:1.82.2.6.2.18.2.11 Fri Jul 11 10:25:15 2008 +++ php-src/main/streams/streams.c Fri Jul 11 12:40:28 2008 @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: streams.c,v 1.82.2.6.2.18.2.11 2008/07/11 10:25:15 tony2001 Exp $ */ +/* $Id: streams.c,v 1.82.2.6.2.18.2.12 2008/07/11 12:40:28 tony2001 Exp $ */ #define _GNU_SOURCE #include "php.h" @@ -1806,8 +1806,9 @@ opened_path, context STREAMS_REL_CC TSRMLS_CC); } - if (context) { - zend_list_addref(context->rsrc_id); + /* increase context refcount only if the context is really used */ + if (stream && stream->context) { + zend_list_addref(stream->context->rsrc_id); } /* if the caller asked for a persistent stream but the wrapper did not
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php