Skip to content

Commit 5d0499a

Browse files
authored
Don't duplicate protoname for stream wrappers (php#20292)
This is never used.
1 parent 275ec6f commit 5d0499a

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

main/streams/userspace.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ static int le_protocols;
3737

3838
struct php_user_stream_wrapper {
3939
php_stream_wrapper wrapper;
40-
char * protoname;
4140
zend_class_entry *ce;
4241
zend_resource *resource;
4342
};
@@ -72,7 +71,6 @@ static void stream_wrapper_dtor(zend_resource *rsrc)
7271
{
7372
struct php_user_stream_wrapper * uwrap = (struct php_user_stream_wrapper*)rsrc->ptr;
7473

75-
efree(uwrap->protoname);
7674
efree(uwrap);
7775
}
7876

@@ -468,7 +466,6 @@ PHP_FUNCTION(stream_wrapper_register)
468466

469467
uwrap = (struct php_user_stream_wrapper *)ecalloc(1, sizeof(*uwrap));
470468
uwrap->ce = ce;
471-
uwrap->protoname = estrndup(ZSTR_VAL(protocol), ZSTR_LEN(protocol));
472469
uwrap->wrapper.wops = &user_stream_wops;
473470
uwrap->wrapper.abstract = uwrap;
474471
uwrap->wrapper.is_url = ((flags & PHP_STREAM_IS_URL) != 0);

0 commit comments

Comments
 (0)