lkml.org 
[lkml]   [2022]   [Oct]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH -next 2/3] blktrace: fix possible memleak in '__blk_trace_remove'
On Mon, Oct 17, 2022 at 02:53:20PM +0800, Ye Bin wrote:
> + if (bt->trace_state == Blktrace_running)
> + blk_trace_switch_state(bt, 0);

AFAICS blk_trace_switch_state already has that state check, so there
should be no need to duplicate it here.

I think having this call in blk_trace_cleanup itself might be a little
more obvious, too.

\
 
 \ /
  Last update: 2022-10-18 09:42    [W:0.054 / U:0.576 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site