Commit 992ec949 authored by Alistair Leslie-Hughes's avatar Alistair Leslie-Hughes Committed by Alexandre Julliard

activeds: Free memory on error paths (coverity).

parent 820a9d0d
......@@ -136,7 +136,10 @@ static HRESULT parse_path(BSTR path, BSTR *provider, BSTR *server, BSTR *dn)
if (!*p) return S_OK;
if (*p++ != '/' || *p++ != '/' || !*p)
{
SysFreeString(*provider);
return E_ADS_BAD_PATHNAME;
}
p_server = p;
server_len = 0;
......@@ -145,7 +148,11 @@ static HRESULT parse_path(BSTR path, BSTR *provider, BSTR *server, BSTR *dn)
p++;
server_len++;
}
if (server_len == 0) return E_ADS_BAD_PATHNAME;
if (server_len == 0)
{
SysFreeString(*provider);
return E_ADS_BAD_PATHNAME;
}
*server = SysAllocStringLen(p_server, server_len);
if (!*server)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment