svn: /php/php-src/ branches/PHP_5_3/ext/intl/grapheme/grapheme_string.c branches/PHP_5_4/ext/intl/grapheme/grapheme_string.c
trunk/ext/intl/grapheme/grapheme_string.c
| From: | Felipe Pena | Date: | Thu, 04 Aug 2011 10:56:59 +0000 |
| Subject: | svn: /php/php-src/ branches/PHP_5_3/ext/intl/grapheme/grapheme_string.c branches/PHP_5_4/ext/intl/grapheme/grapheme_string.c trunk/ext/intl/grapheme/grapheme_string.c |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-65696@lists.php.net to get a copy of this message | ||
felipe Thu, 04 Aug 2011 10:56:59 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=314241
Log:
- Added missing check (thanks neweracracker at gmail dot com)
Changed paths:
U php/php-src/branches/PHP_5_3/ext/intl/grapheme/grapheme_string.c
U php/php-src/branches/PHP_5_4/ext/intl/grapheme/grapheme_string.c
U php/php-src/trunk/ext/intl/grapheme/grapheme_string.c
Modified: php/php-src/branches/PHP_5_3/ext/intl/grapheme/grapheme_string.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/intl/grapheme/grapheme_string.c 2011-08-04 10:36:40 UTC (rev
314240)
+++ php/php-src/branches/PHP_5_3/ext/intl/grapheme/grapheme_string.c 2011-08-04 10:56:59 UTC (rev
314241)
@@ -519,8 +519,9 @@
/* Set error messages. */
intl_error_set_custom_msg( NULL, "Error converting output string to UTF-8", 0
TSRMLS_CC );
-
- efree( sub_str );
+ if (sub_str) {
+ efree( sub_str );
+ }
RETURN_FALSE;
}
Modified: php/php-src/branches/PHP_5_4/ext/intl/grapheme/grapheme_string.c
===================================================================
--- php/php-src/branches/PHP_5_4/ext/intl/grapheme/grapheme_string.c 2011-08-04 10:36:40 UTC (rev
314240)
+++ php/php-src/branches/PHP_5_4/ext/intl/grapheme/grapheme_string.c 2011-08-04 10:56:59 UTC (rev
314241)
@@ -519,8 +519,9 @@
/* Set error messages. */
intl_error_set_custom_msg( NULL, "Error converting output string to UTF-8", 0
TSRMLS_CC );
-
- efree( sub_str );
+ if (sub_str) {
+ efree( sub_str );
+ }
RETURN_FALSE;
}
Modified: php/php-src/trunk/ext/intl/grapheme/grapheme_string.c
===================================================================
--- php/php-src/trunk/ext/intl/grapheme/grapheme_string.c 2011-08-04 10:36:40 UTC (rev 314240)
+++ php/php-src/trunk/ext/intl/grapheme/grapheme_string.c 2011-08-04 10:56:59 UTC (rev 314241)
@@ -519,8 +519,9 @@
/* Set error messages. */
intl_error_set_custom_msg( NULL, "Error converting output string to UTF-8", 0
TSRMLS_CC );
-
- efree( sub_str );
+ if (sub_str) {
+ efree( sub_str );
+ }
RETURN_FALSE;
}