[PATCH] inetcomm: Fixed buffer leak on error path (Coverity)

Nikolay Sivov nsivov at codeweavers.com
Sun Apr 30 14:42:13 CDT 2017


Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
 dlls/inetcomm/protocol.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/dlls/inetcomm/protocol.c b/dlls/inetcomm/protocol.c
index c77cf26859..b7b01d4aaf 100644
--- a/dlls/inetcomm/protocol.c
+++ b/dlls/inetcomm/protocol.c
@@ -495,8 +495,10 @@ static HRESULT WINAPI MimeHtmlProtocol_Start(IInternetProtocol *iface, const WCH
     binding->url[url.mhtml_len] = 0;
 
     hres = CreateURLMoniker(NULL, binding->url, &mon);
-    if(FAILED(hres))
+    if(FAILED(hres)) {
+        heap_free(binding);
         return hres;
+    }
 
     binding->IBindStatusCallback_iface.lpVtbl = &BindStatusCallbackVtbl;
     binding->ref = 1;
-- 
2.11.0




More information about the wine-patches mailing list