mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-03 07:38:10 +00:00
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>
This commit is contained in:
parent
3fe54564a6
commit
5067cf53ca
1 changed files with 2 additions and 0 deletions
|
@ -321,6 +321,8 @@ static void parse_elf(void *output)
|
||||||
default: /* Ignore other PT_* */ break;
|
default: /* Ignore other PT_* */ break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
free(phdrs);
|
||||||
}
|
}
|
||||||
|
|
||||||
asmlinkage void decompress_kernel(void *rmode, memptr heap,
|
asmlinkage void decompress_kernel(void *rmode, memptr heap,
|
||||||
|
|
Loading…
Reference in a new issue