diff options
author | Felipe Pena <felipe@php.net> | 2011-08-04 10:56:59 +0000 |
---|---|---|
committer | Felipe Pena <felipe@php.net> | 2011-08-04 10:56:59 +0000 |
commit | 20dc806810b9596a7812209f30bced4e6971b7de (patch) | |
tree | 179c86831d89155312ca016bf04cbbaed86c3cdd | |
parent | c9e7716cfd137b7c9ec2980273b3bbd4bc743e1f (diff) | |
download | php-git-20dc806810b9596a7812209f30bced4e6971b7de.tar.gz |
- Added missing check (thanks neweracracker at gmail dot com)
-rwxr-xr-x | ext/intl/grapheme/grapheme_string.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/intl/grapheme/grapheme_string.c b/ext/intl/grapheme/grapheme_string.c index 095cc2a046..769ff7ddbb 100755 --- a/ext/intl/grapheme/grapheme_string.c +++ b/ext/intl/grapheme/grapheme_string.c @@ -519,8 +519,9 @@ PHP_FUNCTION(grapheme_substr) /* 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; } |