dbghelp: Return early if HeapAlloc failed.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56223
This commit is contained in:
parent
b89d9f3145
commit
c3ef1a6c67
1 changed files with 2 additions and 0 deletions
|
@ -3036,6 +3036,7 @@ static void* pdb_jg_read(const struct PDB_JG_HEADER* pdb, const WORD* block_list
|
|||
|
||||
num_blocks = (size + pdb->block_size - 1) / pdb->block_size;
|
||||
buffer = HeapAlloc(GetProcessHeap(), 0, num_blocks * pdb->block_size);
|
||||
if (!buffer) return NULL;
|
||||
|
||||
for (i = 0; i < num_blocks; i++)
|
||||
memcpy(buffer + i * pdb->block_size,
|
||||
|
@ -3054,6 +3055,7 @@ static void* pdb_ds_read(const struct PDB_DS_HEADER* pdb, const UINT *block_list
|
|||
|
||||
num_blocks = (size + pdb->block_size - 1) / pdb->block_size;
|
||||
buffer = HeapAlloc(GetProcessHeap(), 0, num_blocks * pdb->block_size);
|
||||
if (!buffer) return NULL;
|
||||
|
||||
for (i = 0; i < num_blocks; i++)
|
||||
memcpy(buffer + i * pdb->block_size,
|
||||
|
|
Loading…
Add table
Reference in a new issue