diff options
| author | Ulf Magnusson <ulfalizer@gmail.com> | 2017-10-08 19:35:45 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-05-30 07:48:53 +0200 |
| commit | 5bfe39f17ddbbb6bc22091d5588d9706608b49a4 (patch) | |
| tree | 82f92eb877248027667bcba5ab516591abf5ae53 /scripts/diffconfig | |
| parent | 921fcd9436681e618c43060307d4ae324547065f (diff) | |
kconfig: Fix expr_free() E_NOT leak
[ Upstream commit 5b1374b3b3c2fc4f63a398adfa446fb8eff791a4 ]
Only the E_NOT operand and not the E_NOT node itself was freed, due to
accidentally returning too early in expr_free(). Outline of leak:
switch (e->type) {
...
case E_NOT:
expr_free(e->left.expr);
return;
...
}
*Never reached, 'e' leaked*
free(e);
Fix by changing the 'return' to a 'break'.
Summary from Valgrind on 'menuconfig' (ARCH=x86) before the fix:
LEAK SUMMARY:
definitely lost: 44,448 bytes in 1,852 blocks
...
Summary after the fix:
LEAK SUMMARY:
definitely lost: 1,608 bytes in 67 blocks
...
Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/diffconfig')
0 files changed, 0 insertions, 0 deletions
