mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 10:41:12 +00:00
netprofm: fix memleak in error exit (Coverity).
This commit is contained in:
parent
d04324f0fa
commit
faa14ba1b1
1 changed files with 5 additions and 1 deletions
|
@ -1681,7 +1681,11 @@ static void init_networks( struct list_manager *mgr )
|
||||||
if (ret != ERROR_BUFFER_OVERFLOW) return;
|
if (ret != ERROR_BUFFER_OVERFLOW) return;
|
||||||
|
|
||||||
if (!(buf = heap_alloc( size ))) return;
|
if (!(buf = heap_alloc( size ))) return;
|
||||||
if (GetAdaptersAddresses( WS_AF_UNSPEC, flags, NULL, buf, &size )) return;
|
if (GetAdaptersAddresses( WS_AF_UNSPEC, flags, NULL, buf, &size ))
|
||||||
|
{
|
||||||
|
heap_free( buf );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
memset( &id, 0, sizeof(id) );
|
memset( &id, 0, sizeof(id) );
|
||||||
for (aa = buf; aa; aa = aa->Next)
|
for (aa = buf; aa; aa = aa->Next)
|
||||||
|
|
Loading…
Reference in a new issue