lkml.org 
[lkml]   [2022]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] objtool: Fix memory leak in create_static_call_section()
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.

\
 
 \ /
  Last update: 2022-07-27 17:57    [W:0.059 / U:2.452 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site