Esme Povirk (@madewokherd) commented about dlls/windowscodecs/metadatahandler.c:
+ { + new_items = realloc(This->items, (This->item_count + 1) * sizeof(*new_items)); + if (new_items) + { + This->items = new_items; + + item = &This->items[This->item_count]; + + PropVariantInit(&item->schema); + PropVariantInit(&item->id); + PropVariantInit(&item->value); + + /* Skip setting the schema value, it's probably format-dependent. */ + hr = PropVariantCopy(&item->id, id); + if (SUCCEEDED(hr)) + hr = PropVariantCopy(&item->value, value); If copying the value fails, we may leak the id.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/7275#note_93940