--- embedaddon/php/ext/com_dotnet/com_typeinfo.c 2012/02/21 23:47:53 1.1.1.1 +++ embedaddon/php/ext/com_dotnet/com_typeinfo.c 2012/05/29 12:34:36 1.1.1.2 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: com_typeinfo.c,v 1.1.1.1 2012/02/21 23:47:53 misho Exp $ */ +/* $Id: com_typeinfo.c,v 1.1.1.2 2012/05/29 12:34:36 misho Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -187,6 +187,10 @@ PHPAPI int php_com_import_typelib(ITypeLib *TL, int mo const_name = php_com_olestring_to_string(bstr_ids, &c.name_len, codepage TSRMLS_CC); c.name = zend_strndup(const_name, c.name_len); efree(const_name); + if(c.name == NULL) { + ITypeInfo_ReleaseVarDesc(TypeInfo, pVarDesc); + continue; + } c.name_len++; /* include NUL */ SysFreeString(bstr_ids);