[ldv-project] [PATCH] objtool: Fix memory leak in create_static_call_section()
Peter Zijlstra
peterz at infradead.org
Wed Jul 27 18:55:16 MSK 2022
On Wed, Jul 27, 2022 at 06:48:25PM +0300, Stanislav Goriainov wrote:
> On some paths of function create_static_call_section() the memory,
> allocated for key_name via strdup(), is not freed. Even though this
> is a utility function, and all memory will be freed automatically
> after the process is finished, there is free(key_sym) in some cases,
> so it would be sensible to always deallocate the memory.
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>
This is a run-once die on error program. This is pointless and most
certainly doesn't 'fix' anything.
More information about the ldv-project
mailing list