winhttp: Fix a memory leak.

Found by valgrind.
This commit is contained in:
Hans Leidekker 2009-10-21 13:18:18 +02:00 committed by Alexandre Julliard
parent f80ca42e4b
commit 7c59b46890
1 changed files with 1 additions and 0 deletions

View File

@ -368,6 +368,7 @@ BOOL set_server_for_hostname( connect_t *connect, LPCWSTR server, INTERNET_PORT
}
else if (server)
{
heap_free( connect->servername );
if (!(connect->servername = strdupW( server )))
{
ret = FALSE;