mirror of
https://github.com/php/php-src.git
synced 2024-11-28 04:14:26 +08:00
fix segfault when failed to open magic file
This commit is contained in:
parent
950632519b
commit
5e8cd3a2da
@ -269,8 +269,8 @@ PHP_FUNCTION(finfo_open)
|
||||
|
||||
if (magic_load(finfo->magic, file) == -1) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to load magic database at '%s'.", file);
|
||||
efree(finfo);
|
||||
magic_close(finfo->magic);
|
||||
efree(finfo);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user