From dcc545be219290df91c9b7ab9bb41d918541223c Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Sun, 30 Apr 2017 22:42:13 +0300 Subject: [PATCH] inetcomm: Fixed buffer leak on error path (Coverity). Signed-off-by: Nikolay Sivov Signed-off-by: Alexandre Julliard --- 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 c77cf268590..b7b01d4aaf2 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;