From 5d0499af7e9f00f56274dcb397339f3883ffd03e Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sun, 26 Oct 2025 08:39:33 +0100 Subject: [PATCH] Don't duplicate protoname for stream wrappers (#20292) This is never used. --- main/streams/userspace.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/main/streams/userspace.c b/main/streams/userspace.c index b1ea8818aec..f5e25aa96c7 100644 --- a/main/streams/userspace.c +++ b/main/streams/userspace.c @@ -37,7 +37,6 @@ static int le_protocols; struct php_user_stream_wrapper { php_stream_wrapper wrapper; - char * protoname; zend_class_entry *ce; zend_resource *resource; }; @@ -72,7 +71,6 @@ static void stream_wrapper_dtor(zend_resource *rsrc) { struct php_user_stream_wrapper * uwrap = (struct php_user_stream_wrapper*)rsrc->ptr; - efree(uwrap->protoname); efree(uwrap); } @@ -468,7 +466,6 @@ PHP_FUNCTION(stream_wrapper_register) uwrap = (struct php_user_stream_wrapper *)ecalloc(1, sizeof(*uwrap)); uwrap->ce = ce; - uwrap->protoname = estrndup(ZSTR_VAL(protocol), ZSTR_LEN(protocol)); uwrap->wrapper.wops = &user_stream_wops; uwrap->wrapper.abstract = uwrap; uwrap->wrapper.is_url = ((flags & PHP_STREAM_IS_URL) != 0);