Skip to content

Commit 70d2e99

Browse files
masahir0ygregkh
authored andcommitted
kconfig: fix memory leak in sym_warn_unmet_dep()
[ Upstream commit a409fc1 ] The string allocated in sym_warn_unmet_dep() is never freed, leading to a memory leak when an unmet dependency is detected. Fixes: f8f69dc ("kconfig: make unmet dependency warnings readable") Signed-off-by: Masahiro Yamada <[email protected]> Reviewed-by: Petr Vorel <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 8f6e078 commit 70d2e99

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

scripts/kconfig/symbol.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,7 @@ static void sym_warn_unmet_dep(const struct symbol *sym)
388388
" Selected by [m]:\n");
389389

390390
fputs(str_get(&gs), stderr);
391+
str_free(&gs);
391392
sym_warnings++;
392393
}
393394

0 commit comments

Comments
 (0)