nsi: Return an error if NsiAllocateAndGetTable() fails to allocate the tables.

err must be set if the last attempt to allocate the tables fails.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54328
This commit is contained in:
Francois Gouget 2023-01-17 19:34:37 +01:00 committed by Alexandre Julliard
parent 3bcda5aefa
commit cc32eb6c0d

View file

@ -70,6 +70,7 @@ DWORD WINAPI NsiAllocateAndGetTable( DWORD unk, const NPI_MODULEID *module, DWOR
memset( data, 0, sizeof(data) );
err = NsiEnumerateObjectsAllParameters( unk, 0, module, table, NULL, 0, NULL, 0, NULL, 0, NULL, 0, &num );
if (err) return err;
err = ERROR_OUTOFMEMORY; /* fail if this is the last attempt */
}
if (!err)