Commit ab636923 authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

winhttp: Do not free name too early (Coverity).

parent e0fa39b3
...@@ -1247,7 +1247,6 @@ BOOL WINAPI WinHttpDetectAutoProxyConfigUrl( DWORD flags, LPWSTR *url ) ...@@ -1247,7 +1247,6 @@ BOOL WINAPI WinHttpDetectAutoProxyConfigUrl( DWORD flags, LPWSTR *url )
strcpy( name, "wpad" ); strcpy( name, "wpad" );
strcat( name, p ); strcat( name, p );
res = getaddrinfo( name, NULL, NULL, &ai ); res = getaddrinfo( name, NULL, NULL, &ai );
heap_free( name );
if (!res) if (!res)
{ {
*url = build_wpad_url( name, ai ); *url = build_wpad_url( name, ai );
...@@ -1255,10 +1254,12 @@ BOOL WINAPI WinHttpDetectAutoProxyConfigUrl( DWORD flags, LPWSTR *url ) ...@@ -1255,10 +1254,12 @@ BOOL WINAPI WinHttpDetectAutoProxyConfigUrl( DWORD flags, LPWSTR *url )
if (*url) if (*url)
{ {
TRACE("returning %s\n", debugstr_w(*url)); TRACE("returning %s\n", debugstr_w(*url));
heap_free( name );
ret = TRUE; ret = TRUE;
break; break;
} }
} }
heap_free( name );
p++; p++;
} }
heap_free( domain ); heap_free( domain );
......
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