Signed-off-by: Sven Baars sven.wine@gmail.com --- dlls/scrobj/scrobj.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/scrobj/scrobj.c b/dlls/scrobj/scrobj.c index ce5a3dedd1..1d37864039 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; } } @@ -1529,11 +1530,11 @@ static HRESULT parse_scriptlet_public(struct scriptlet_factory *factory) return E_FAIL; }
- if (!(parameter = heap_alloc(sizeof(*parameter)))) return E_OUTOFMEMORY; + if (!(parameter = heap_alloc_zero(sizeof(*parameter)))) return E_OUTOFMEMORY; + list_add_tail(&member->u.parameters, ¶meter->entry);
hres = read_xml_value(factory, ¶meter->name); if (FAILED(hres)) return hres; - list_add_tail(&member->u.parameters, ¶meter->entry); if (!empty && FAILED(hres = expect_end_element(factory))) return hres; } break;
Signed-off-by: Sven Baars sven.wine@gmail.com --- dlls/scrobj/tests/scrobj.c | 1 - 1 file changed, 1 deletion(-)
diff --git a/dlls/scrobj/tests/scrobj.c b/dlls/scrobj/tests/scrobj.c index 023aa30f92..93779883fe 100644 --- a/dlls/scrobj/tests/scrobj.c +++ b/dlls/scrobj/tests/scrobj.c @@ -634,7 +634,6 @@ static HRESULT WINAPI ClassFactory_CreateInstance(IClassFactory *iface, IUnknown ok(!outer, "outer = %p\n", outer); ok(IsEqualGUID(&IID_IUnknown, riid), "unexpected riid %s\n", wine_dbgstr_guid(riid)); *ppv = &ActiveScript; - site = NULL; return S_OK; }
Signed-off-by: Jacek Caban jacek@codeweavers.com