From f9562faebded909074edeff5269cd7f3e122a012 Mon Sep 17 00:00:00 2001 From: Michael Buesch Date: Sun, 18 May 2008 12:58:16 +0200 Subject: [PATCH] b43-asm: Fix memory allocation bug. Signed-off-by: Michael Buesch --- assembler/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assembler/main.c b/assembler/main.c index f2d2826..774f8f9 100644 --- a/assembler/main.c +++ b/assembler/main.c @@ -488,8 +488,8 @@ static unsigned int merge_external_jmp_into_opcode(struct assembler_context *ctx /* This instruction has two fake r0 operands * at position 0 and 1. */ - fake = xmalloc(sizeof(struct operand)); - fake_reg = xmalloc(sizeof(struct operand)); + fake = xmalloc(sizeof(*fake)); + fake_reg = xmalloc(sizeof(*fake_reg)); fake->type = OPER_REG; fake->u.reg = fake_reg; fake_reg->type = GPR; -- 2.31.1