cvs: php-src(PHP_5_1) /ext/date php_date.c /ext/date/lib parse_tz.c

From: Date: Sat, 18 Mar 2006 23:43:48 +0000
Subject: cvs: php-src(PHP_5_1) /ext/date php_date.c /ext/date/lib parse_tz.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-37339@lists.php.net to get a copy of this message
tony2001 Sat Mar 18 23:43:48 2006 UTC Modified files: (Branch: PHP_5_1) /php-src/ext/date php_date.c /php-src/ext/date/lib parse_tz.c Log: fix several leaks in date_sun*() functions http://cvs.php.net/viewcvs.cgi/php-src/ext/date/php_date.c?r1=1.43.2.42&r2=1.43.2.43&diff_format=u Index: php-src/ext/date/php_date.c diff -u php-src/ext/date/php_date.c:1.43.2.42 php-src/ext/date/php_date.c:1.43.2.43 --- php-src/ext/date/php_date.c:1.43.2.42 Mon Mar 6 21:44:53 2006 +++ php-src/ext/date/php_date.c Sat Mar 18 23:43:48 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_date.c,v 1.43.2.42 2006/03/06 21:44:53 derick Exp $ */ +/* $Id: php_date.c,v 1.43.2.43 2006/03/18 23:43:48 tony2001 Exp $ */ #include "php.h" #include "php_streams.h" @@ -1746,7 +1746,8 @@ timelib_unixtime2local(t, time); rs = timelib_astro_rise_set_altitude(t, longitude, latitude, altitude, altitude > -1 ? 1 : 0, &h_rise, &h_set, &rise, &set, &transit); - + timelib_time_dtor(t); + if (rs != 0) { RETURN_FALSE; } @@ -1889,6 +1890,8 @@ t2->sse = set; add_assoc_long(return_value, "astronomical_twilight_end", timelib_date_to_int(t2, &dummy)); } + timelib_time_dtor(t); + timelib_time_dtor(t2); } /* }}} */ /* http://cvs.php.net/viewcvs.cgi/php-src/ext/date/lib/parse_tz.c?r1=1.20.2.5&r2=1.20.2.6&diff_format=u Index: php-src/ext/date/lib/parse_tz.c diff -u php-src/ext/date/lib/parse_tz.c:1.20.2.5 php-src/ext/date/lib/parse_tz.c:1.20.2.6 --- php-src/ext/date/lib/parse_tz.c:1.20.2.5 Wed Jan 4 21:31:34 2006 +++ php-src/ext/date/lib/parse_tz.c Sat Mar 18 23:43:48 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: parse_tz.c,v 1.20.2.5 2006/01/04 21:31:34 derick Exp $ */ +/* $Id: parse_tz.c,v 1.20.2.6 2006/03/18 23:43:48 tony2001 Exp $ */ #include "timelib.h" @@ -368,6 +368,7 @@ timelib_sll timelib_get_current_offset(timelib_time *t) { timelib_time_offset *gmt_offset; + timelib_sll retval; switch (t->zone_type) { case TIMELIB_ZONETYPE_ABBR: @@ -376,7 +377,9 @@ case TIMELIB_ZONETYPE_ID: gmt_offset = timelib_get_time_zone_info(t->sse, t->tz_info); - return gmt_offset->offset; + retval = gmt_offset->offset; + timelib_time_offset_dtor(gmt_offset); + return retval; default: return 0;

« previous php.cvs (#37339) next »