summaryrefslogtreecommitdiff
path: root/ext/openssl/xp_ssl.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/openssl/xp_ssl.c')
-rw-r--r--ext/openssl/xp_ssl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/openssl/xp_ssl.c b/ext/openssl/xp_ssl.c
index d1d97940bf..3beefb6d23 100644
--- a/ext/openssl/xp_ssl.c
+++ b/ext/openssl/xp_ssl.c
@@ -556,7 +556,9 @@ static inline int php_openssl_tcp_sockop_accept(php_stream *stream, php_openssl_
xparam->outputs.client = php_stream_alloc_rel(stream->ops, clisockdata, NULL, "r+");
if (xparam->outputs.client) {
- xparam->outputs.client->context = stream->context;
+ if (stream->context) {
+ zend_list_addref(stream->context->rsrc_id);
+ }
}
}