mirror of
https://github.com/php/php-src.git
synced 2024-12-12 19:33:31 +08:00
Merge branch 'PHP-7.4' into master
* PHP-7.4: Fix #48585: com_load_typelib holds reference, fails on second call
This commit is contained in:
commit
013dcab344
@ -244,7 +244,7 @@ PHP_METHOD(com, __construct)
|
||||
TL = php_com_load_typelib_via_cache(typelib_name, obj->code_page, &cached);
|
||||
|
||||
if (TL) {
|
||||
if (COMG(autoreg_on) && !cached) {
|
||||
if (COMG(autoreg_on)) {
|
||||
php_com_import_typelib(TL, mode, obj->code_page);
|
||||
}
|
||||
|
||||
@ -834,9 +834,7 @@ PHP_FUNCTION(com_load_typelib)
|
||||
php_com_initialize();
|
||||
pTL = php_com_load_typelib_via_cache(name, codepage, &cached);
|
||||
if (pTL) {
|
||||
if (cached) {
|
||||
RETVAL_TRUE;
|
||||
} else if (php_com_import_typelib(pTL, cs ? CONST_CS : 0, codepage) == SUCCESS) {
|
||||
if (php_com_import_typelib(pTL, cs ? CONST_CS : 0, codepage) == SUCCESS) {
|
||||
RETVAL_TRUE;
|
||||
}
|
||||
|
||||
|
@ -115,9 +115,7 @@ static PHP_INI_MH(OnTypeLibFileUpdate)
|
||||
}
|
||||
|
||||
if ((pTL = php_com_load_typelib_via_cache(typelib_name, COMG(code_page), &cached)) != NULL) {
|
||||
if (!cached) {
|
||||
php_com_import_typelib(pTL, mode, COMG(code_page));
|
||||
}
|
||||
php_com_import_typelib(pTL, mode, COMG(code_page));
|
||||
ITypeLib_Release(pTL);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user