]> granicus.if.org Git - php/commitdiff
- Added missing check (thanks neweracracker at gmail dot com)
authorFelipe Pena <felipe@php.net>
Thu, 4 Aug 2011 10:56:59 +0000 (10:56 +0000)
committerFelipe Pena <felipe@php.net>
Thu, 4 Aug 2011 10:56:59 +0000 (10:56 +0000)
ext/intl/grapheme/grapheme_string.c

index 095cc2a0466cad6f6fb461c2320081673732788d..769ff7ddbb1520da81da0ea2a6f397dee8f817f6 100755 (executable)
@@ -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;
                }