mirror of
https://github.com/php/php-src.git
synced 2025-08-20 09:24:05 +02:00
Leak caused by wrong and unreachable cleanup
This commit is contained in:
parent
01004c6abb
commit
ae3a827bf9
1 changed files with 5 additions and 3 deletions
|
@ -108,6 +108,7 @@ static UDate internal_get_timestamp(IntlDateFormatter_object *dfo,
|
||||||
second,
|
second,
|
||||||
mday;
|
mday;
|
||||||
UCalendar *pcal;
|
UCalendar *pcal;
|
||||||
|
UDate result;
|
||||||
intl_error *err = &dfo->datef_data.error;
|
intl_error *err = &dfo->datef_data.error;
|
||||||
|
|
||||||
#define INTL_GET_ELEM(elem) \
|
#define INTL_GET_ELEM(elem) \
|
||||||
|
@ -139,8 +140,9 @@ static UDate internal_get_timestamp(IntlDateFormatter_object *dfo,
|
||||||
/* actually, ucal_setDateTime cannot fail */
|
/* actually, ucal_setDateTime cannot fail */
|
||||||
|
|
||||||
/* Fetch the timestamp from the UCalendar */
|
/* Fetch the timestamp from the UCalendar */
|
||||||
return ucal_getMillis(pcal, &INTL_DATA_ERROR_CODE(dfo));
|
result = ucal_getMillis(pcal, &INTL_DATA_ERROR_CODE(dfo));
|
||||||
udat_close(pcal);
|
ucal_close(pcal);
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue