[PATCH] wsdapi: Fixed memory leak in error path (Coverity)

Marcus Meissner marcus at jet.franken.de
Tue Jun 20 02:25:05 CDT 2017


CID 1412747 Resource leak

Signed-off-by: Marcus Meissner <marcus at jet.franken.de>
---
 dlls/wsdapi/discovery.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dlls/wsdapi/discovery.c b/dlls/wsdapi/discovery.c
index c9ef9c2a27..82a1ca0a5a 100644
--- a/dlls/wsdapi/discovery.c
+++ b/dlls/wsdapi/discovery.c
@@ -366,6 +366,7 @@ HRESULT WINAPI WSDCreateDiscoveryPublisher(IWSDXMLContext *pContext, IWSDiscover
         if (FAILED(WSDXMLCreateContext(&obj->xmlContext)))
         {
             WARN("Unable to create XML context\n");
+            HeapFree (GetProcessHeap(), 0, obj);
             return E_OUTOFMEMORY;
         }
     }
-- 
2.13.1




More information about the wine-patches mailing list