]> granicus.if.org Git - php/commitdiff
Fix bug #68166
authorRasmus Lerdorf <rasmus@lerdorf.com>
Sun, 22 Feb 2015 16:14:41 +0000 (08:14 -0800)
committerRasmus Lerdorf <rasmus@lerdorf.com>
Sun, 22 Feb 2015 16:14:41 +0000 (08:14 -0800)
We can't always efree here
php_escape_html_entities can return an interned_empty_string

main/main.c

index a98aff075540b57f8e053354347b914ede8949f6..7787ac6488f5bb4f8c2c5abc3fc69c84249da065 100644 (file)
@@ -1157,7 +1157,7 @@ static void php_error_cb(int type, const char *error_filename, const uint error_
                                                size_t len;
                                                char *buf = php_escape_html_entities(buffer, buffer_len, &len, 0, ENT_COMPAT, NULL TSRMLS_CC);
                                                php_printf("%s<br />\n<b>%s</b>:  %s in <b>%s</b> on line <b>%d</b><br />\n%s", STR_PRINT(prepend_string), error_type_str, buf, error_filename, error_lineno, STR_PRINT(append_string));
-                                               efree(buf);
+                                               str_efree(buf);
                                        } else {
                                                php_printf("%s<br />\n<b>%s</b>:  %s in <b>%s</b> on line <b>%d</b><br />\n%s", STR_PRINT(prepend_string), error_type_str, buffer, error_filename, error_lineno, STR_PRINT(append_string));
                                        }