提交 5067cf53 编写于 作者: J Jesper Juhl 提交者: Ingo Molnar

x86/boot-image: Don't leak phdrs in arch/x86/boot/compressed/misc.c::Parse_elf()

We allocate memory with malloc(), but neglect to free it before
the variable 'phdrs' goes out of scope --> leak.
Signed-off-by: NJesper Juhl <jj@chaosbits.net>
Link: http://lkml.kernel.org/r/alpine.LNX.2.00.1201232332590.8772@swampdragon.chaosbits.net
[ Mostly harmless. ]
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 3fe54564
......@@ -321,6 +321,8 @@ static void parse_elf(void *output)
default: /* Ignore other PT_* */ break;
}
}
free(phdrs);
}
asmlinkage void decompress_kernel(void *rmode, memptr heap,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册