diff options
author | Wez Furlong <wez@php.net> | 2004-10-09 13:08:16 +0000 |
---|---|---|
committer | Wez Furlong <wez@php.net> | 2004-10-09 13:08:16 +0000 |
commit | 9bffcfb407ba515906e616407a5fd133957e2394 (patch) | |
tree | f458781828134fa091542a55491797feafb0d245 /ext/com_dotnet | |
parent | a86095fe07bb396b8940ce6b3840c0df303d5912 (diff) | |
download | php-git-9bffcfb407ba515906e616407a5fd133957e2394.tar.gz |
Fix crash bug.
# how the f*** did this work in the first place!?
Diffstat (limited to 'ext/com_dotnet')
-rw-r--r-- | ext/com_dotnet/com_typeinfo.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/ext/com_dotnet/com_typeinfo.c b/ext/com_dotnet/com_typeinfo.c index ed521d1233..9a10376d0b 100644 --- a/ext/com_dotnet/com_typeinfo.c +++ b/ext/com_dotnet/com_typeinfo.c @@ -227,34 +227,35 @@ void php_com_typelibrary_dtor(void *pDest) PHPAPI ITypeLib *php_com_load_typelib_via_cache(char *search_string, int codepage, int *cached TSRMLS_DC) { - ITypeLib **TL; + ITypeLib **TLp; + ITypeLib *TL; char *name_dup; int l; l = strlen(search_string); if (zend_ts_hash_find(&php_com_typelibraries, search_string, l+1, - (void**)&TL) == SUCCESS) { + (void**)&TLp) == SUCCESS) { *cached = 1; /* add a reference for the caller */ - ITypeLib_AddRef(*TL); - return *TL; + ITypeLib_AddRef(*TLp); + return *TLp; } *cached = 0; name_dup = estrndup(search_string, l); - *TL = php_com_load_typelib(name_dup, codepage TSRMLS_CC); + TL = php_com_load_typelib(name_dup, codepage TSRMLS_CC); efree(name_dup); - if (*TL) { + if (TL) { if (SUCCESS == zend_ts_hash_update(&php_com_typelibraries, - search_string, l+1, (void*)*TL, sizeof(ITypeLib*), NULL)) { + search_string, l+1, (void*)TL, sizeof(ITypeLib*), NULL)) { /* add a reference for the hash table */ - ITypeLib_AddRef(*TL); + ITypeLib_AddRef(TL); } } - return *TL; + return TL; } ITypeInfo *php_com_locate_typeinfo(char *typelibname, php_com_dotnet_object *obj, char *dispname, int sink TSRMLS_DC) |