Hi Sven,
On 19/10/2019 15:20, Sven Baars wrote:
Signed-off-by: Sven Baars sven.wine@gmail.com
dlls/scrobj/scrobj.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/dlls/scrobj/scrobj.c b/dlls/scrobj/scrobj.c index ce5a3dedd1..8d23c65f55 100644 --- a/dlls/scrobj/scrobj.c +++ b/dlls/scrobj/scrobj.c @@ -1491,6 +1491,7 @@ static HRESULT parse_scriptlet_public(struct scriptlet_factory *factory) if (!wcsicmp(member_iter->name, member->name)) { FIXME("Duplicated member %s\n", debugstr_w(member->name));
heap_free(member); return E_FAIL; } }
@@ -1532,7 +1533,11 @@ static HRESULT parse_scriptlet_public(struct scriptlet_factory *factory) if (!(parameter = heap_alloc(sizeof(*parameter)))) return E_OUTOFMEMORY;
hres = read_xml_value(factory, ¶meter->name);
if (FAILED(hres)) return hres;
if (FAILED(hres))
{
heap_free(parameter);
return hres;
} list_add_tail(&member->u.parameters, ¶meter->entry); if (!empty && FAILED(hres = expect_end_element(factory))) return hres; }
You could just move list_add_tail() call to be done just after heap_alloc.
Thanks,
Jacek