=?UTF-8?Q?Andr=C3=A9=20Hentschel=20?=: oleaut32: Don't leak SafeArray ( coverity).

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


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

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

oleaut32: Don't leak SafeArray (coverity).

---

 dlls/oleaut32/typelib.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c
index 602181c..7700121 100644
--- a/dlls/oleaut32/typelib.c
+++ b/dlls/oleaut32/typelib.c
@@ -6499,6 +6499,7 @@ static HRESULT WINAPI ITypeInfo_fnInvoke(
                             if (hres != S_OK)
                             {
                                 ERR("SafeArrayAccessData failed with %x\n", hres);
+                                SafeArrayDestroy(a);
                                 break;
                             }
                             for (j = 0; j < bound.cElements; j++)
@@ -6507,6 +6508,7 @@ static HRESULT WINAPI ITypeInfo_fnInvoke(
                             if (hres != S_OK)
                             {
                                 ERR("SafeArrayUnaccessData failed with %x\n", hres);
+                                SafeArrayDestroy(a);
                                 break;
                             }
                             V_ARRAY(&rgvarg[i]) = a;




More information about the wine-cvs mailing list