Skip to content

Commit 7c0dec0

Browse files
committed
Remove extra reference count on images loaded via byte array (case 923165)
1 parent e2d3ddd commit 7c0dec0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

mono/metadata/appdomain.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2175,6 +2175,9 @@ ves_icall_System_AppDomain_LoadAssemblyRaw (MonoAppDomainHandle ad,
21752175
return refass;
21762176
}
21772177

2178+
/* Clear the reference added by mono_image_open_from_data_full above */
2179+
mono_image_close (image);
2180+
21782181
refass = mono_assembly_get_object_handle (domain, ass, error);
21792182
if (!MONO_HANDLE_IS_NULL(refass))
21802183
MONO_HANDLE_SET (refass, evidence, evidence);

0 commit comments

Comments
 (0)