wininet: Release object in HttpEndRequestW after use.

This commit is contained in:
Nigel Liang 2007-10-17 17:07:41 -07:00 committed by Alexandre Julliard
parent c2b52a11f4
commit 7d2ac2039b
1 changed files with 3 additions and 0 deletions

View File

@ -830,6 +830,8 @@ BOOL WINAPI HttpEndRequestW(HINTERNET hRequest,
if (NULL == lpwhr || lpwhr->hdr.htype != WH_HHTTPREQ)
{
INTERNET_SetLastError(ERROR_INTERNET_INCORRECT_HANDLE_TYPE);
if (lpwhr)
WININET_Release( &lpwhr->hdr );
return FALSE;
}
@ -881,6 +883,7 @@ BOOL WINAPI HttpEndRequestW(HINTERNET hRequest,
}
}
WININET_Release( &lpwhr->hdr );
TRACE("%i <--\n",rc);
return rc;
}