Hi,
This looks good, thank you. Few comments below.
Signed-off-by: yaoyongjie yaoyongjie@uniontech.com
Please make your name in this line match From: in your email.
hr = GetHGlobalFromStream(hstream, &hglobal); if (FAILED(hr)) + { + IStream_Release(hstream); return hr; + }
This won't fail in practice, but I'm fine with keeping it obvious.
@@ -807,10 +810,12 @@ static HRESULT domdoc_load_from_stream(domdoc *doc, ISequentialStream *stream) if (!xmldoc) { + IStream_Release(hstream); ERR("Failed to parse xml\n"); return E_FAIL; } + IStream_Release(hstream); xmldoc->_private = create_priv();
It has to be released on all paths, so let's have IStream_Release() right after GlobalUnlock(hglobal).