On Wed Dec 6 01:41:59 2023 +0000, Zhiyi Zhang wrote:
Let's return early when !mt is true and call FreeMediaType(&stream_mt) when req_size < *size so that stream_mt is not leaked on these branches as well.
~~but then the fix isn't tiny anymore~~
Can't return any earlier, need to set *size.
But yes, good catch. I'm not a huge fan of amt_from_wg_format allocating at all, but trying to refactor that is out of scope for this MR.