summaryrefslogtreecommitdiff
path: root/ext/date/php_date.c
diff options
context:
space:
mode:
authorAaron Piotrowski <aaron@trowski.com>2015-07-05 23:25:53 -0500
committerAaron Piotrowski <aaron@trowski.com>2015-07-05 23:25:53 -0500
commit7ec1e174645a549c19e4cf7d6930a4f1449c8f15 (patch)
treed676d94379c8afbd8fef3b8c30a8c3749db0dc5b /ext/date/php_date.c
parent907476f34c0dbe34e311c4a99cc07eb40fd2954b (diff)
downloadphp-git-7ec1e174645a549c19e4cf7d6930a4f1449c8f15.tar.gz
Update memory freeing and other issues, revert some changes
Diffstat (limited to 'ext/date/php_date.c')
-rw-r--r--ext/date/php_date.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/date/php_date.c b/ext/date/php_date.c
index fbb142b66d..36c965b79d 100644
--- a/ext/date/php_date.c
+++ b/ext/date/php_date.c
@@ -3701,6 +3701,7 @@ PHP_METHOD(DateTimeZone, __set_state)
tzobj = Z_PHPTIMEZONE_P(return_value);
if(php_date_timezone_initialize_from_hash(&return_value, &tzobj, myht) != SUCCESS) {
zend_throw_error(zend_ce_error, "Timezone initialization failed");
+ zval_dtor(return_value);
RETURN_FALSE;
}
}
@@ -5019,7 +5020,7 @@ static zval *date_period_read_property(zval *object, zval *member, int type, voi
zval *zv;
if (type != BP_VAR_IS && type != BP_VAR_R) {
zend_throw_error(zend_ce_error, "Retrieval of DatePeriod properties for modification is unsupported");
- return NULL;
+ return &EG(uninitialized_zval);
}
Z_OBJPROP_P(object); /* build properties hash table */