]> 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:25:56 +0000 (08:25 -0800)
We can't always efree here
php_escape_html_entities can return an interned_empty_string

main/main.c

index 5e564003fec3d7cf68f298b2d12df79cace51a40..733786e447fe78579e89aebf305a87155f5d2215 100644 (file)
@@ -1087,7 +1087,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));
                                        }