Marcus Meissner : webservices: Fixed memory leak in build_custom_header ( Coverity).

Alexandre Julliard julliard at winehq.org
Tue Jun 20 15:34:55 CDT 2017


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

Author: Marcus Meissner <marcus at jet.franken.de>
Date:   Tue Jun 20 09:14:46 2017 +0200

webservices: Fixed memory leak in build_custom_header (Coverity).

Signed-off-by: Marcus Meissner <marcus at jet.franken.de>
Signed-off-by: Hans Leidekker <hans at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/webservices/msg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/webservices/msg.c b/dlls/webservices/msg.c
index f27aceac..1b5ec04 100644
--- a/dlls/webservices/msg.c
+++ b/dlls/webservices/msg.c
@@ -1418,7 +1418,7 @@ static HRESULT build_custom_header( struct msg *msg, const WS_XML_STRING *name,
 
     if (!(header = alloc_header( 0, FALSE, name, ns ))) return E_OUTOFMEMORY;
 
-    if (!msg->writer && (hr = WsCreateWriter( NULL, 0, &msg->writer, NULL )) != S_OK) return hr;
+    if (!msg->writer && (hr = WsCreateWriter( NULL, 0, &msg->writer, NULL )) != S_OK) goto done;
     if ((hr = WsCreateXmlBuffer( msg->heap, NULL, 0, &buf, NULL )) != S_OK) goto done;
     if ((hr = WsSetOutputToBuffer( msg->writer, buf, NULL, 0, NULL )) != S_OK) goto done;
     if ((hr = write_custom_header( msg->writer, name, ns, type, desc, option, value, size )) != S_OK) goto done;




More information about the wine-cvs mailing list