Signed-off-by: Alex Henrie alexhenrie24@gmail.com --- dlls/ole32/compositemoniker.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/dlls/ole32/compositemoniker.c b/dlls/ole32/compositemoniker.c index a94e4734f45..05901bb52b3 100644 --- a/dlls/ole32/compositemoniker.c +++ b/dlls/ole32/compositemoniker.c @@ -751,7 +751,11 @@ static HRESULT WINAPI CompositeMonikerImpl_CommonPrefixWith(IMoniker *iface, IMo heap_free(components); heap_free(other_components);
- if (!prefix_len) return MK_E_NOPREFIX; + if (!prefix_len) + { + heap_free(prefix_components); + return MK_E_NOPREFIX; + }
last = prefix_components[0]; for (i = 1; i < prefix_len; ++i)
Signed-off-by: Alex Henrie alexhenrie24@gmail.com --- dlls/ole32/compositemoniker.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/dlls/ole32/compositemoniker.c b/dlls/ole32/compositemoniker.c index 05901bb52b3..c234f60f953 100644 --- a/dlls/ole32/compositemoniker.c +++ b/dlls/ole32/compositemoniker.c @@ -1627,6 +1627,7 @@ static HRESULT composite_get_rightmost(CompositeMonikerImpl *composite, IMoniker if (!(node = moniker_tree_get_rightmost(root))) { WARN("Couldn't get right most component.\n"); + moniker_tree_release(root); return E_FAIL; }
@@ -1663,6 +1664,7 @@ static HRESULT composite_get_leftmost(CompositeMonikerImpl *composite, IMoniker if (!(node = moniker_tree_get_leftmost(root))) { WARN("Couldn't get right most component.\n"); + moniker_tree_release(root); return E_FAIL; }