diff options
author | Jesper Juhl <jj@chaosbits.net> | 2012-01-23 17:34:59 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2012-01-26 05:30:29 -0500 |
commit | 5067cf53cac9b36d42ebb3a45bb12259d0bc1e68 (patch) | |
tree | a8ff8b6b14ee8c9ba75fe2d6211fe2b89a5e44c7 /arch/x86 | |
parent | 3fe54564a61f72982032423d24041dca30617ca2 (diff) |
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: Jesper Juhl <jj@chaosbits.net>
Link: http://lkml.kernel.org/r/alpine.LNX.2.00.1201232332590.8772@swampdragon.chaosbits.net
[ Mostly harmless. ]
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/boot/compressed/misc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/boot/compressed/misc.c b/arch/x86/boot/compressed/misc.c index 3a19d04cebeb..7116dcba0c9e 100644 --- a/arch/x86/boot/compressed/misc.c +++ b/arch/x86/boot/compressed/misc.c | |||
@@ -321,6 +321,8 @@ static void parse_elf(void *output) | |||
321 | default: /* Ignore other PT_* */ break; | 321 | default: /* Ignore other PT_* */ break; |
322 | } | 322 | } |
323 | } | 323 | } |
324 | |||
325 | free(phdrs); | ||
324 | } | 326 | } |
325 | 327 | ||
326 | asmlinkage void decompress_kernel(void *rmode, memptr heap, | 328 | asmlinkage void decompress_kernel(void *rmode, memptr heap, |