Commit-ID: c31767c5cbe3bde0648a0aaa9f07cd204cad88d4
Gitweb: http://repo.or.cz/w/nasm.git?a=commitdiff;h=c31767c5cbe3bde0648a0aaa9f07cd204cad88d4
Author: Cyrill Gorcunov <gor...@gm...>
AuthorDate: Sat, 28 Jun 2014 02:22:17 +0400
Committer: Cyrill Gorcunov <gor...@gm...>
CommitDate: Sun, 29 Jun 2014 00:52:54 +0400
preproc: Use nasm_zalloc in new_Block
Signed-off-by: Cyrill Gorcunov <gor...@gm...>
---
preproc.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/preproc.c b/preproc.c
index ffba0bc..9b114c2 100644
--- a/preproc.c
+++ b/preproc.c
@@ -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;
}
|