Permalink
Browse files

2007-08-24 Mark Probst <mark.probst@gmail.com>

	* monodiet.c (handle_cattrs): Fixed a custom attr leak.

2007-08-24  Mark Probst  <mark.probst@gmail.com>

	* mini.c (mono_method_to_ir), declsec.c
	(mono_declsec_linkdemand_aptc): Fixed custom attr leaks.

svn path=/trunk/mono/; revision=84802
  • Loading branch information...
1 parent 5cd8dd4 commit a1d65e3cda06f7ff55599cf0e363c4e051678a51 @schani schani committed Aug 24, 2007
Showing with 16 additions and 0 deletions.
  1. +4 −0 mono/metadata/ChangeLog
  2. +1 −0 mono/metadata/monodiet.c
  3. +5 −0 mono/mini/ChangeLog
  4. +2 −0 mono/mini/declsec.c
  5. +4 −0 mono/mini/mini.c
View
@@ -1,3 +1,7 @@
+2007-08-24 Mark Probst <mark.probst@gmail.com>
+
+ * monodiet.c (handle_cattrs): Fixed a custom attr leak.
+
2007-08-24 Robert Jordan <robertj@gmx.net>
* appdomain.c: don't perform the ':'->';' substitution on Win32.
View
@@ -218,6 +218,7 @@ handle_cattrs (MonoCustomAttrInfo* cattrs)
for (i = 0; i < cattrs->num_attrs; ++i) {
add_types_from_method (cattrs->attrs [i].ctor);
}
+ mono_custom_attrs_free (cattrs);
}
static void
View
@@ -1,3 +1,8 @@
+2007-08-24 Mark Probst <mark.probst@gmail.com>
+
+ * mini.c (mono_method_to_ir), declsec.c
+ (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
+
2007-08-22 Martin Baulig <martin@ximian.com>
* debug-mini.h
View
@@ -214,6 +214,8 @@ mono_declsec_linkdemand_aptc (MonoDomain *domain, MonoMethod *caller, MonoMethod
/* 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);
}
View
@@ -4157,12 +4157,16 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
if (custom && mono_custom_attrs_has_attr (custom, secman->suppressunmanagedcodesecurity)) {
pinvoke = FALSE;
}
+ if (custom)
+ mono_custom_attrs_free (custom);
if (pinvoke) {
custom = mono_custom_attrs_from_class (wrapped->klass);
if (custom && mono_custom_attrs_has_attr (custom, secman->suppressunmanagedcodesecurity)) {
pinvoke = FALSE;
}
+ if (custom)
+ mono_custom_attrs_free (custom);
}
} else {
/* not a P/Invoke after all */

0 comments on commit a1d65e3

Please sign in to comment.