Skip to content

Commit 562d251

Browse files
committed
PHP-142 - Memory Leak in Timestamp::toDateTime()
* Also UserTypeValue::values()
1 parent 6393513 commit 562d251

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

ext/src/Timestamp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ PHP_METHOD(Timestamp, toDateTime)
139139
php_date_initialize(datetime_obj, str, str_len, NULL, NULL, 0 TSRMLS_CC);
140140
efree(str);
141141

142-
RETVAL_ZVAL(datetime, 0, 0);
142+
RETVAL_ZVAL(datetime, 0, 1);
143143
}
144144
/* }}} */
145145

ext/src/UserTypeValue.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ PHP_METHOD(UserTypeValue, type)
144144
PHP_METHOD(UserTypeValue, values)
145145
{
146146
php_driver_user_type_value *self = NULL;
147-
array_init(return_value);
148147
self = PHP_DRIVER_GET_USER_TYPE_VALUE(getThis());
149148

150149
array_init(return_value);

0 commit comments

Comments
 (0)