Skip to content
Snippets Groups Projects
Commit 4d796458 authored by André Zwing's avatar André Zwing Committed by Alexandre Julliard
Browse files

setupapi: Avoid memory leaks (coverity).

parent a46bfd64
No related branches found
No related tags found
No related merge requests found
......@@ -1640,6 +1640,7 @@ BOOL WINAPI SetupGetInfFileListW(PCWSTR dir, DWORD style, PWSTR buffer,
( 2 + dir_len + name_len) * sizeof( WCHAR ));
if( !fullname )
{
FindClose( hdl );
HeapFree( GetProcessHeap(), 0, filter );
SetLastError( ERROR_NOT_ENOUGH_MEMORY );
return FALSE;
......
......@@ -1156,7 +1156,11 @@ BOOL WINAPI SetupInstallFileExW( HINF hinf, PINFCONTEXT inf_context, PCWSTR sour
SetLastError( ERROR_NOT_ENOUGH_MEMORY );
return FALSE;
}
if (!SetupGetStringFieldW( inf_context, 1, inf_source, len, NULL )) return FALSE;
if (!SetupGetStringFieldW( inf_context, 1, inf_source, len, NULL ))
{
HeapFree( GetProcessHeap(), 0, inf_source );
return FALSE;
}
source = inf_source;
}
else if (!source)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment