com php-src: Leak caused by wrong and unreachable cleanup: ext/intl/dateformat/dateformat_format.c

From: Date: Mon, 23 Jul 2012 15:00:52 +0000
Subject: com php-src: Leak caused by wrong and unreachable cleanup: ext/intl/dateformat/dateformat_format.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-69664@lists.php.net to get a copy of this message
Commit: ae3a827bf9b14c88bb7d52a19ad74bf0f074dc73 Author: Gustavo Lopes <glopes@safelinq.com> Mon, 23 Jul 2012 17:00:52 +0200 Parents: 01004c6abb53ee235f7d76295c48c3082c998a5b Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=ae3a827bf9b14c88bb7d52a19ad74bf0f074dc73 Log: Leak caused by wrong and unreachable cleanup Changed paths: M ext/intl/dateformat/dateformat_format.c Diff: diff --git a/ext/intl/dateformat/dateformat_format.c b/ext/intl/dateformat/dateformat_format.c index d5a17f9..ffae155 100755 --- a/ext/intl/dateformat/dateformat_format.c +++ b/ext/intl/dateformat/dateformat_format.c @@ -108,6 +108,7 @@ static UDate internal_get_timestamp(IntlDateFormatter_object *dfo, second, mday; UCalendar *pcal; + UDate result; intl_error *err = &dfo->datef_data.error; #define INTL_GET_ELEM(elem) \ @@ -137,10 +138,11 @@ static UDate internal_get_timestamp(IntlDateFormatter_object *dfo, /* set the incoming values for the calendar */ ucal_setDateTime(pcal, year, month, mday, hour, minute, second, &INTL_DATA_ERROR_CODE(dfo)); /* actually, ucal_setDateTime cannot fail */ - + /* Fetch the timestamp from the UCalendar */ - return ucal_getMillis(pcal, &INTL_DATA_ERROR_CODE(dfo)); - udat_close(pcal); + result = ucal_getMillis(pcal, &INTL_DATA_ERROR_CODE(dfo)); + ucal_close(pcal); + return result; }

« previous php.cvs (#69664) next »