Commit 51d96dac authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

xmllite: Free elem in error paths (Coverity).

parent af18f3e0
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment