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)