lkml.org 
[lkml]   [2022]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] bnx2x: fix potential memory leak in bnx2x_tpa_stop()
On Wed,  7 Sep 2022 14:51:28 +0800 Jianglei Nie wrote:
> bnx2x_tpa_stop() allocates a memory chunk from new_data with
> bnx2x_frag_alloc(). The new_data should be freed when gets some error.
> But when "pad + len > fp->rx_buf_size" is true, bnx2x_tpa_stop() returns
> without releasing the new_data, which will lead to a memory leak.
>
> We should free the new_data with bnx2x_frag_free() when "pad + len >
> fp->rx_buf_size" is true.

Please add a Fixes tag and repost.

\
 
 \ /
  Last update: 2022-09-19 23:22    [W:0.106 / U:2.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site