=?UTF-8?Q?Fr=C3=A9d=C3=A9ric=20Delanoy=20?=: ole32: Fix some leaks ( coverity).

Alexandre Julliard julliard at winehq.org
Fri Nov 9 11:03:23 CST 2012


Module: wine
Branch: master
Commit: 780228b6cac5bd3bcc1afd1901924b27283b10b4
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=780228b6cac5bd3bcc1afd1901924b27283b10b4

Author: Frédéric Delanoy <frederic.delanoy at gmail.com>
Date:   Fri Nov  9 10:17:41 2012 +0100

ole32: Fix some leaks (coverity).

---

 dlls/ole32/storage32.c |    5 +++--
 1 files 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;




More information about the wine-cvs mailing list