{
mono_jit_stats.cas_declsec_check++;
- if (method->wrapper_type == MONO_WRAPPER_MANAGED_TO_NATIVE) {
+ if (method->wrapper_type == MONO_WRAPPER_MANAGED_TO_NATIVE || method->wrapper_type == MONO_WRAPPER_MANAGED_TO_MANAGED) {
method = mono_marshal_method_from_wrapper (method);
if (!method)
return FALSE;
/* look for AllowPartiallyTrustedCallersAttribute */
result = mono_custom_attrs_has_attr (cinfo, secman->allowpartiallytrustedcallers);
}
+ if (cinfo)
+ mono_custom_attrs_free (cinfo);
MONO_SECMAN_FLAG_SET_VALUE (assembly->aptc, result);
}