Skip to content

Commit

Permalink
kconfig: fix memory leak in sym_warn_unmet_dep()
Browse files Browse the repository at this point in the history
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 <masahiroy@kernel.org>
Reviewed-by: Petr Vorel <pvorel@suse.cz>
  • Loading branch information
masahir0y committed Jan 29, 2025
1 parent a314f52 commit a409fc1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions scripts/kconfig/symbol.c
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,7 @@ static void sym_warn_unmet_dep(const struct symbol *sym)
" Selected by [m]:\n");

fputs(str_get(&gs), stderr);
str_free(&gs);
sym_warnings++;
}

Expand Down

0 comments on commit a409fc1

Please sign in to comment.