diff options
author | Dmitry Stogov <dmitry@zend.com> | 2018-07-05 10:57:49 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2018-07-05 10:57:49 +0300 |
commit | 265c3ed6cfd05b78fb65187f18b3e1ecb560c242 (patch) | |
tree | 55601eaa8fa113bba16538ef475420c38f92e3b1 /ext/intl/timezone/timezone_methods.cpp | |
parent | 587ab006984dae0ecee2c8eb41f08d3da155d7ef (diff) | |
download | php-git-265c3ed6cfd05b78fb65187f18b3e1ecb560c242.tar.gz |
Fixed incorrrecr zval_dtor() usage to replace value of argument passed by reference, that may lead to memory leaks.
Diffstat (limited to 'ext/intl/timezone/timezone_methods.cpp')
-rw-r--r-- | ext/intl/timezone/timezone_methods.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/ext/intl/timezone/timezone_methods.cpp b/ext/intl/timezone/timezone_methods.cpp index 5cf5afc934..9dd2f60939 100644 --- a/ext/intl/timezone/timezone_methods.cpp +++ b/ext/intl/timezone/timezone_methods.cpp @@ -314,7 +314,7 @@ U_CFUNC PHP_FUNCTION(intltz_get_canonical_id) if (is_systemid) { /* by-ref argument passed */ ZVAL_DEREF(is_systemid); - zval_dtor(is_systemid); + zval_ptr_dtor(is_systemid); ZVAL_BOOL(is_systemid, isSystemID); } } @@ -465,11 +465,9 @@ U_CFUNC PHP_FUNCTION(intltz_get_offset) INTL_METHOD_CHECK_STATUS(to, "intltz_get_offset: error obtaining offset"); - ZVAL_DEREF(rawOffsetArg); - zval_dtor(rawOffsetArg); + zval_ptr_dtor(rawOffsetArg); ZVAL_LONG(rawOffsetArg, rawOffset); - ZVAL_DEREF(dstOffsetArg); - zval_dtor(dstOffsetArg); + zval_ptr_dtor(dstOffsetArg); ZVAL_LONG(dstOffsetArg, dstOffset); RETURN_TRUE; |