=?UTF-8?Q?Andr=C3=A9=20Hentschel=20?=: ole32: Don' t leak memory allocated by enumx_allocate (coverity).

Alexandre Julliard julliard at winehq.org
Mon Oct 29 13:52:50 CDT 2012


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

Author: André Hentschel <nerv at dawncrow.de>
Date:   Sun Oct 28 16:16:52 2012 +0100

ole32: Don't leak memory allocated by enumx_allocate (coverity).

---

 dlls/ole32/stg_prop.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/dlls/ole32/stg_prop.c b/dlls/ole32/stg_prop.c
index b582654..c2626cf 100644
--- a/dlls/ole32/stg_prop.c
+++ b/dlls/ole32/stg_prop.c
@@ -2386,7 +2386,10 @@ static HRESULT create_EnumSTATPROPSETSTG(
     /* add all the property set elements into a list */
     r = IStorage_EnumElements(stg, 0, NULL, 0, &penum);
     if (FAILED(r))
+    {
+        enumx_Release(enumx);
         return E_OUTOFMEMORY;
+    }
 
     while (1)
     {




More information about the wine-cvs mailing list