winhttp: Do not free name too early (Coverity).
This commit is contained in:
parent
e0fa39b3e0
commit
ab6369231f
|
@ -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 )
|
||||||
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 );
|
||||||
|
|
Loading…
Reference in New Issue