[sre] Don't leak coop handles in mono_dynimage_encode_typedef_or_ref_full
authorAleksey Kliger <aleksey@xamarin.com>
Sat, 13 May 2017 01:24:49 +0000 (21:24 -0400)
committerAleksey Kliger (λgeek) <akliger@gmail.com>
Mon, 15 May 2017 14:33:54 +0000 (10:33 -0400)
commitd321424cabda97947e66b02242f66881e27ab744
tree831b52478da63ed9d10470cef1f181d6f37fe208
parent7eafb61cf17393f67f847d7ad79182df0f6f6e61
[sre] Don't leak coop handles in mono_dynimage_encode_typedef_or_ref_full

This function calls mono_class_get_ref_info which allocates a coop handle.
However it is called from an icall that wasn't converted to use coop handles
yet, so nothing was saving/restoring the handle stack mark, and consequently
the handles leak.
mono/metadata/sre-encode.c