]> granicus.if.org Git - php/commitdiff
Must addref the resource when we make a new zval reference to it that will be exporte...
authorSara Golemon <pollita@php.net>
Mon, 1 Mar 2004 05:33:19 +0000 (05:33 +0000)
committerSara Golemon <pollita@php.net>
Mon, 1 Mar 2004 05:33:19 +0000 (05:33 +0000)
main/streams/php_stream_context.h

index 3b1eb099434e60f9ea878755a7a81b024dad86ac..fadb38820451fa1f565594327628780db83ad52b 100644 (file)
@@ -38,7 +38,7 @@ typedef void (*php_stream_notification_func)(php_stream_context *context,
                FG(default_context) ? FG(default_context) : \
                (FG(default_context) = php_stream_context_alloc()) )
 
-#define php_stream_context_to_zval(context, zval) { ZVAL_RESOURCE(zval, (context)->rsrc_id); }
+#define php_stream_context_to_zval(context, zval) { ZVAL_RESOURCE(zval, (context)->rsrc_id); zend_list_addref((context)->rsrc_id); }
 
 typedef struct _php_stream_notifier php_stream_notifier;