[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20241013095459.kah7oxlax5qio2nw@DEN-DL-M70577>
Date: Sun, 13 Oct 2024 09:54:59 +0000
From: Daniel Machon <daniel.machon@...rochip.com>
To: Jens Emil Schulz Østergaard
<jensemil.schulzostergaard@...rochip.com>
CC: Jinjie Ruan <ruanjinjie@...wei.com>, <lars.povlsen@...rochip.com>,
<Steen.Hegelund@...rochip.com>, <davem@...emloft.net>, <edumazet@...gle.com>,
<kuba@...nel.org>, <pabeni@...hat.com>, <UNGLinuxDriver@...rochip.com>,
<linux-arm-kernel@...ts.infradead.org>, <netdev@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] net: microchip: vcap api: Fix memory leaks in
vcap_api_encode_rule_test()
> >
> > Wait, should vcap_del_rule not handle the freeing of the rule?
> > Maybe Emil can shed some light on this..
> >
> > /Daniel
> >
>
> No, this is a bug. I made the mistake of thinking that vcap_del_rule freed the
> rule.
>
> However, it frees an internal copy of the rule, which is made in vcap_add_rule.
> The local copy must still be freed. I reproduced the leak and the patch fixes
> this.
>
> /Emil
Ah, right. Thanks for clarifying!
/Daniel
Powered by blists - more mailing lists