ole32: Fix some leaks (coverity) (try 2)
Frédéric Delanoy
frederic.delanoy at gmail.com
Fri Nov 9 03:17:41 CST 2012
CIDs 713625-713627
try 2: simplify by freeing memory in all cases after the end label
---
dlls/ole32/storage32.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c
index d2e9f69..8498eaf 100644
--- a/dlls/ole32/storage32.c
+++ b/dlls/ole32/storage32.c
@@ -8769,13 +8769,14 @@ HRESULT WINAPI ReadFmtUserTypeStg (LPSTORAGE pstg, CLIPFORMAT* pcf, LPOLESTR* lp
/* ok, success... now we just need to store what we found */
if( pcf )
*pcf = RegisterClipboardFormatW( szOleTypeName );
- CoTaskMemFree( szOleTypeName );
if( lplpszUserType )
*lplpszUserType = szCLSIDName;
- CoTaskMemFree( szProgIDName );
end:
+ CoTaskMemFree( szCLSIDName );
+ CoTaskMemFree( szOleTypeName );
+ CoTaskMemFree( szProgIDName );
IStream_Release( stm );
return r;
--
1.8.0
More information about the wine-patches
mailing list