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

netprofm: fix memleak in error exit (Coverity).

parent d04324f0
...@@ -1681,7 +1681,11 @@ static void init_networks( struct list_manager *mgr ) ...@@ -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)
......
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