[metadata] Fix leaks when handling a few attributes (mono/mono#16675)
authorVlad Brezae <brezaevlad@gmail.com>
Fri, 6 Sep 2019 07:31:39 +0000 (10:31 +0300)
committerGitHub <noreply@github.com>
Fri, 6 Sep 2019 07:31:39 +0000 (10:31 +0300)
commitc3780f23a5e543e675894fc388e3bc6f4f48c8a3
tree96668aab1b5f8be65dbc8d3e96c1e0a784dff5a7
parent1f1a63d544a312220cc4517989ca4f45a54aec6b
[metadata] Fix leaks when handling a few attributes (mono/mono#16675)

Callers of mono_reflection_create_custom_attr_data_args_noalloc were leaking some of the returned information. Accessed attributes are FixedBufferAttribute and UnmanagedFunctionPointerAttribute.

Commit migrated from https://github.com/mono/mono/commit/e49be5b9ec63e526d6bec04a957cbe48753b651b
src/mono/mono/metadata/marshal-ilgen.c
src/mono/mono/metadata/marshal.c
src/mono/mono/mini/debugger-agent.c