]> granicus.if.org Git - php/commitdiff
Fix possible segfault (this one came up when a method could not be found).
authorWez Furlong <wez@php.net>
Mon, 13 Oct 2003 01:29:39 +0000 (01:29 +0000)
committerWez Furlong <wez@php.net>
Mon, 13 Oct 2003 01:29:39 +0000 (01:29 +0000)
Add a couple of headers used by another file that is not yet ready to
commit.

ext/com_dotnet/com_handlers.c
ext/com_dotnet/php_com_dotnet_internal.h

index 7a51777023a10326ebb88b6927055c05b338c666..72537c99430aa1361678dc2bda555b23a654204a 100644 (file)
@@ -316,7 +316,9 @@ static union _zend_function *com_method_get(zval *object, char *name, int len TS
                                                ITypeComp_Release(bindptr.lptcomp);
                                                break;
                                }
-                               ITypeInfo_Release(TI);
+                               if (TI) {
+                                       ITypeInfo_Release(TI);
+                               }
                        }
                        ITypeComp_Release(comp);
                        efree(olename);
index 90cc44760f2d2b6b6d6c5b31f8fc4b46b3bc42c2..749306e12b26775b53a222d0af1ed4199535e74f 100644 (file)
@@ -24,7 +24,9 @@
 #define _WIN32_DCOM
 #define COBJMACROS
 #include <ocidl.h>
-#include "oleauto.h"
+#include <oleauto.h>
+#include <unknwn.h>
+#include <dispex.h>
 #include "win32/winutil.h"
 
 /* brain-death in winutil.h defines the macro to hide the useful function... */