rpcrt4: Fixed memory leak.

This commit is contained in:
Jacek Caban 2012-08-15 10:22:56 +02:00 committed by Alexandre Julliard
parent cbdb58476a
commit 07cb28c641
1 changed files with 2 additions and 0 deletions

View File

@ -2384,12 +2384,14 @@ static RPC_STATUS rpcrt4_ncacn_http_open(RpcConnection* Connection)
if (!httpc->in_request)
{
ERR("HttpOpenRequestW failed with error %d\n", GetLastError());
HeapFree(GetProcessHeap(), 0, url);
return RPC_S_SERVER_UNAVAILABLE;
}
httpc->out_request = HttpOpenRequestW(httpc->session, wszVerbOut, url, NULL, NULL,
wszAcceptTypes,
(secure ? INTERNET_FLAG_SECURE : 0)|INTERNET_FLAG_KEEP_CONNECTION|INTERNET_FLAG_PRAGMA_NOCACHE,
(DWORD_PTR)httpc->async_data);
HeapFree(GetProcessHeap(), 0, url);
if (!httpc->out_request)
{
ERR("HttpOpenRequestW failed with error %d\n", GetLastError());