diff --git a/dlls/oleaut32/tmarshal.c b/dlls/oleaut32/tmarshal.c
index d192d01f3a8699460af8e904ea578de9681c355d..cf0df90d038f287e463089e5a2216b1a601ca90c 100644
--- a/dlls/oleaut32/tmarshal.c
+++ b/dlls/oleaut32/tmarshal.c
@@ -356,6 +356,7 @@ static int _nroffuncs(ITypeInfo *tinfo) {
         n += _nroffuncs(tinfo2);
         ITypeInfo_Release(tinfo2);
     }
+    ITypeInfo_ReleaseTypeAttr(tinfo, attr);
     i = 0;
     while (1) {
 	hres = ITypeInfoImpl_GetInternalFuncDesc(tinfo,i,&fdesc);