[PATCH] webservices: Fix some leaks on error paths (Coverity).
Sven Baars
sven.wine at gmail.com
Sat Oct 19 15:45:44 CDT 2019
Signed-off-by: Sven Baars <sven.wine at gmail.com>
---
dlls/webservices/msg.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/dlls/webservices/msg.c b/dlls/webservices/msg.c
index a006841be6..5e9c70924d 100644
--- a/dlls/webservices/msg.c
+++ b/dlls/webservices/msg.c
@@ -1577,12 +1577,17 @@ static HRESULT get_header_value_wsz( struct header *header, WS_READ_OPTION optio
case WS_READ_OPTIONAL_POINTER:
case WS_READ_NILLABLE_POINTER:
- if (size != sizeof(str)) return E_INVALIDARG;
+ if (size != sizeof(str))
+ {
+ ws_free(heap, str, sizeof(str));
+ return E_INVALIDARG;
+ }
*ret = str;
break;
default:
FIXME( "read option %u not supported\n", option );
+ ws_free(heap, str, sizeof(str));
return E_NOTIMPL;
}
--
2.17.1
More information about the wine-devel
mailing list