[PATCH] winhttp: do not free name to early (Coverity)
Marcus Meissner
meissner at suse.de
Thu Dec 27 12:43:27 CST 2012
---
dlls/winhttp/session.c | 3 ++-
1 Datei geändert, 2 Zeilen hinzugefügt(+), 1 Zeile entfernt(-)
diff --git a/dlls/winhttp/session.c b/dlls/winhttp/session.c
index c360a7e..d5aa153 100644
--- a/dlls/winhttp/session.c
+++ b/dlls/winhttp/session.c
@@ -1247,7 +1247,6 @@ BOOL WINAPI WinHttpDetectAutoProxyConfigUrl( DWORD flags, LPWSTR *url )
strcpy( name, "wpad" );
strcat( name, p );
res = getaddrinfo( name, NULL, NULL, &ai );
- heap_free( name );
if (!res)
{
*url = build_wpad_url( name, ai );
@@ -1255,10 +1254,12 @@ BOOL WINAPI WinHttpDetectAutoProxyConfigUrl( DWORD flags, LPWSTR *url )
if (*url)
{
TRACE("returning %s\n", debugstr_w(*url));
+ heap_free( name );
ret = TRUE;
break;
}
}
+ heap_free( name );
p++;
}
heap_free( domain );
--
1.7.10.4
More information about the wine-patches
mailing list