Module: wine Branch: master Commit: dcc545be219290df91c9b7ab9bb41d918541223c URL: http://source.winehq.org/git/wine.git/?a=commit;h=dcc545be219290df91c9b7ab9b...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Sun Apr 30 22:42:13 2017 +0300
inetcomm: Fixed buffer leak on error path (Coverity).
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
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 c77cf26..b7b01d4 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;