summaryrefslogtreecommitdiff
path: root/main/streams/transports.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2018-05-28 16:27:12 +0300
committerDmitry Stogov <dmitry@zend.com>2018-05-28 16:27:12 +0300
commit5eb1f92f31cafc48384f9096012f421b37f6d425 (patch)
tree4ed67b92229407e7b5cbab37b96428fe80eb3f94 /main/streams/transports.c
parent925f05dd1a35eafa71eb29abb69cdfc31a23a75d (diff)
downloadphp-git-5eb1f92f31cafc48384f9096012f421b37f6d425.tar.gz
Use zend_string_release_ex() instread of zend_string_release() in places, where we sure about string persistence.
Diffstat (limited to 'main/streams/transports.c')
-rw-r--r--main/streams/transports.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/main/streams/transports.c b/main/streams/transports.c
index 8908745ac5..6fc77910d4 100644
--- a/main/streams/transports.c
+++ b/main/streams/transports.c
@@ -35,7 +35,7 @@ PHPAPI int php_stream_xport_register(const char *protocol, php_stream_transport_
zend_string *str = zend_string_init_interned(protocol, strlen(protocol), 1);
ret = zend_hash_update_ptr(&xport_hash, str, factory) ? SUCCESS : FAILURE;
- zend_string_release(str);
+ zend_string_release_ex(str, 1);
return ret;
}
@@ -51,7 +51,7 @@ PHPAPI int php_stream_xport_unregister(const char *protocol)
#define ERR_RETURN(out_err, local_err, fmt) \
if (out_err) { *out_err = local_err; } \
else { php_error_docref(NULL, E_WARNING, fmt, local_err ? ZSTR_VAL(local_err) : "Unspecified error"); \
- if (local_err) { zend_string_release(local_err); local_err = NULL; } \
+ if (local_err) { zend_string_release_ex(local_err, 0); local_err = NULL; } \
}
PHPAPI php_stream *_php_stream_xport_create(const char *name, size_t namelen, int options,