mirror of
https://github.com/reactos/wine.git
synced 2024-12-02 08:46:29 +00:00
xmllite: Free elem in error paths (Coverity).
This commit is contained in:
parent
af18f3e059
commit
51d96dac70
@ -379,12 +379,18 @@ static HRESULT reader_push_element(xmlreader *reader, strval *qname)
|
||||
if (!elem) return E_OUTOFMEMORY;
|
||||
|
||||
hr = reader_strvaldup(reader, qname, &elem->qname);
|
||||
if (FAILED(hr)) return hr;
|
||||
if (FAILED(hr)) {
|
||||
reader_free(reader, elem);
|
||||
return hr;
|
||||
}
|
||||
|
||||
if (!list_empty(&reader->elements))
|
||||
{
|
||||
hr = reader_inc_depth(reader);
|
||||
if (FAILED(hr)) return hr;
|
||||
if (FAILED(hr)) {
|
||||
reader_free(reader, elem);
|
||||
return hr;
|
||||
}
|
||||
}
|
||||
|
||||
list_add_head(&reader->elements, &elem->entry);
|
||||
|
Loading…
Reference in New Issue
Block a user