mirror of
https://github.com/netwide-assembler/nasm.git
synced 2024-12-03 08:41:02 +08:00
preproc: Use nasm_zalloc in new_Block
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
This commit is contained in:
parent
4d8dbd98b2
commit
c31767c5cb
@ -1160,10 +1160,7 @@ static void *new_Block(size_t size)
|
||||
b->chunk = nasm_malloc(size);
|
||||
|
||||
/* now allocate a new block for the next request */
|
||||
b->next = nasm_malloc(sizeof(Blocks));
|
||||
/* and initialize the contents of the new block */
|
||||
b->next->next = NULL;
|
||||
b->next->chunk = NULL;
|
||||
b->next = nasm_zalloc(sizeof(Blocks));
|
||||
return b->chunk;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user