summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2011-02-28 09:33:08 +0300
committerCyrill Gorcunov <gorcunov@gmail.com>2011-02-28 09:33:08 +0300
commitb4af1ac7654118b2d959dbbd12bcbacdd2dc2b7e (patch)
treea7c487488e1cf868ffc1b0abd3ded6a861c70955
parentc13deef255b621ace2130adf55530f3364a40458 (diff)
downloadnasm-b4af1ac7654118b2d959dbbd12bcbacdd2dc2b7e.tar.gz
outcoff: Use nasm_zalloc helper
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
-rw-r--r--output/outcoff.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/output/outcoff.c b/output/outcoff.c
index 5c1de013..6c728063 100644
--- a/output/outcoff.c
+++ b/output/outcoff.c
@@ -285,16 +285,11 @@ static int coff_make_section(char *name, uint32_t flags)
{
struct Section *s;
- s = nasm_malloc(sizeof(*s));
+ s = nasm_zalloc(sizeof(*s));
if (flags != BSS_FLAGS)
s->data = saa_init(1);
- else
- s->data = NULL;
- s->head = NULL;
s->tail = &s->head;
- s->len = 0;
- s->nrelocs = 0;
if (!strcmp(name, ".text"))
s->index = def_seg;
else