From 4d565644b63ec45a79cd71ea20950b9061d5fcdf Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Sun, 25 Aug 2013 15:40:36 +0400 Subject: [PATCH] ole32: Release marshal info on error path. --- dlls/ole32/git.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dlls/ole32/git.c b/dlls/ole32/git.c index 4d44e392121..b83d415ce93 100644 --- a/dlls/ole32/git.c +++ b/dlls/ole32/git.c @@ -180,7 +180,12 @@ StdGlobalInterfaceTable_RegisterInterfaceInGlobal( IStream_Seek(stream, zero, STREAM_SEEK_SET, NULL); entry = HeapAlloc(GetProcessHeap(), 0, sizeof(StdGITEntry)); - if (entry == NULL) return E_OUTOFMEMORY; + if (!entry) + { + CoReleaseMarshalData(stream); + IStream_Release(stream); + return E_OUTOFMEMORY; + } EnterCriticalSection(&git_section);