[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAAa=b7ft-crBJm+H9U7Bn2dcgfjQsE8o53p2ryBWK3seQoF3Cg@mail.gmail.com>
Date: Thu, 15 Aug 2019 16:03:39 -0400
From: Wenwen Wang <wenwen@...uga.edu>
To: David Miller <davem@...emloft.net>
Cc: Richard Fontana <rfontana@...hat.com>,
Allison Randal <allison@...utok.net>,
Alexios Zavras <alexios.zavras@...el.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Thomas Gleixner <tglx@...utronix.de>,
"open list:NETWORKING [GENERAL]" <netdev@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>,
Wenwen Wang <wenwen@...uga.edu>
Subject: Re: [PATCH] net: pch_gbe: Fix memory leaks
On Thu, Aug 15, 2019 at 3:34 PM David Miller <davem@...emloft.net> wrote:
>
> From: Wenwen Wang <wenwen@...uga.edu>
> Date: Tue, 13 Aug 2019 20:33:45 -0500
>
> > In pch_gbe_set_ringparam(), if netif_running() returns false, 'tx_old' and
> > 'rx_old' are not deallocated, leading to memory leaks. To fix this issue,
> > move the free statements after the if branch.
> >
> > Signed-off-by: Wenwen Wang <wenwen@...uga.edu>
>
> Why would they be "deallocated"? They are still assigned to
> adapter->tx_ring and adapter->rx_ring.
'adapter->tx_ring' and 'adapter->rx_ring' has been covered by newly
allocated 'txdr' and 'rxdr' respectively before this if statement.
Wenwen
Powered by blists - more mailing lists