Esme Povirk (@madewokherd) commented about dlls/windowscodecs/tests/metadata.c:
- UINT count, len;
- HRESULT hr;
- hr = CoCreateInstance(&CLSID_WICImagingFactory, NULL, CLSCTX_INPROC_SERVER,
&IID_IWICComponentFactory, (void **)&factory);
- ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
- /* Using query reader created with CreateQueryReaderFromBlockReader().
It's not allowed to create the writer for top level reader. */
- hr = CoCreateInstance(&CLSID_WICApp1MetadataReader, NULL, CLSCTX_INPROC_SERVER,
&IID_IWICMetadataReader, (void **)&reader);
- ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
- load_stream(reader, (const char *)&app1_data, sizeof(app1_data), 0);
- hr = create_query_reader_from_metadata_reader(factory, reader, &GUID_ContainerFormatJpeg, &query_reader);
I don't think this is released before `query_reader` is assigned NULL below.