Skip to content

Commit 8357a69

Browse files
committed
Fix memory leak in COM ctor
We have to free strings returned from php_com_olestring_to_string().
1 parent 885cb79 commit 8357a69

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/com_dotnet/com_com.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ PHP_FUNCTION(com_create_instance)
273273
/* add a reference for the hash */
274274
ITypeLib_AddRef(TL);
275275
}
276-
276+
efree(typelib_name);
277277
} else {
278278
/* try it anyway */
279279
php_com_import_typelib(TL, mode, obj->code_page);

0 commit comments

Comments
 (0)