Alexandre Julliard : wininet: Don't free name before the IPv6 lookup.
Module: wine Branch: master Commit: 2329f91998c6c61ba6960e9d6dfd62a7a014a640 URL: http://source.winehq.org/git/wine.git/?a=commit;h=2329f91998c6c61ba6960e9d6d... Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Jan 11 20:09:42 2012 +0100 wininet: Don't free name before the IPv6 lookup. --- dlls/wininet/utility.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dlls/wininet/utility.c b/dlls/wininet/utility.c index 96b8d31..9a70e62 100644 --- a/dlls/wininet/utility.c +++ b/dlls/wininet/utility.c @@ -184,17 +184,17 @@ BOOL GetAddress(LPCWSTR lpszServerName, INTERNET_PORT nServerPort, hints.ai_family = AF_INET; ret = getaddrinfo( name, NULL, &hints, &res ); - heap_free( name ); if (ret != 0) { TRACE("failed to get IPv4 address of %s (%s), retrying with IPv6\n", debugstr_w(lpszServerName), gai_strerror(ret)); hints.ai_family = AF_INET6; ret = getaddrinfo( name, NULL, &hints, &res ); - if (ret != 0) - { - TRACE("failed to get address of %s (%s)\n", debugstr_w(lpszServerName), gai_strerror(ret)); - return FALSE; - } + } + heap_free( name ); + if (ret != 0) + { + TRACE("failed to get address of %s (%s)\n", debugstr_w(lpszServerName), gai_strerror(ret)); + return FALSE; } if (*sa_len < res->ai_addrlen) {
participants (1)
-
Alexandre Julliard