]> granicus.if.org Git - php/commitdiff
Fix memory leak in COM ctor
authorChristoph M. Becker <cmbecker69@gmx.de>
Sat, 29 Jun 2019 12:47:06 +0000 (14:47 +0200)
committerChristoph M. Becker <cmbecker69@gmx.de>
Sat, 29 Jun 2019 12:51:13 +0000 (14:51 +0200)
We have to free strings returned from php_com_olestring_to_string().

ext/com_dotnet/com_com.c

index 6619cb4b44a99af2bf5bae4bcbe508b92aff5b73..fc8e84b3a144ad8fcf50cae1f1fcb59d508000f0 100644 (file)
@@ -273,7 +273,7 @@ PHP_FUNCTION(com_create_instance)
                                        /* add a reference for the hash */
                                        ITypeLib_AddRef(TL);
                                }
-
+                               efree(typelib_name);
                        } else {
                                /* try it anyway */
                                php_com_import_typelib(TL, mode, obj->code_page);