]> git.baikalelectronics.ru Git - kernel.git/commit
net:CXGB4: fix leak if sk_buff is not used
authorÍñigo Huguet <ihuguet@redhat.com>
Wed, 5 May 2021 12:54:50 +0000 (14:54 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 5 May 2021 19:46:00 +0000 (12:46 -0700)
commit0e4db303668dfb2e827a31842644f3dc14114621
treee240196573dbd0c9a39e43fd19652ca9a328bd93
parent4b72722cbcb7c6ae75664b8b5db3b8c16878ebb2
net:CXGB4: fix leak if sk_buff is not used

An sk_buff is allocated to send a flow control message, but it's not
sent in all cases: in case the state is not appropiate to send it or if
it can't be enqueued.

In the first of these 2 cases, the sk_buff was discarded but not freed,
producing a memory leak.

Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/chelsio/cxgb4/sge.c