diff options
author | Dmitry Stogov <dmitry@zend.com> | 2017-11-16 17:09:32 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2017-11-16 17:09:32 +0300 |
commit | ccc12b82da5dd10b44ab067b68b762298a9eb4eb (patch) | |
tree | 9b17d9d3f99f518fe44532c55ac255c3e0134a13 /ext/session | |
parent | ce18738a30b3d7f20b392c9167aa251c009a0c21 (diff) | |
download | php-git-ccc12b82da5dd10b44ab067b68b762298a9eb4eb.tar.gz |
Avoid unnecessary reference-counting on strings.
Diffstat (limited to 'ext/session')
-rw-r--r-- | ext/session/session.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/session/session.c b/ext/session/session.c index bfd1c9b566..3fa1b7a026 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -2383,11 +2383,12 @@ static PHP_FUNCTION(session_start) if (zend_string_equals_literal(str_idx, "read_and_close")) { read_and_close = zval_get_long(value); } else { - zend_string *val = zval_get_string(value); + zend_string *tmp_val; + zend_string *val = zval_get_tmp_string(value, &tmp_val); if (php_session_start_set_ini(str_idx, val) == FAILURE) { php_error_docref(NULL, E_WARNING, "Setting option '%s' failed", ZSTR_VAL(str_idx)); } - zend_string_release(val); + zend_tmp_string_release(tmp_val); } break; default: |