[PATCH] net: microchip: vcap api: Fix memory leaks in vcap_api_encode_rule_test()
Daniel Machon
daniel.machon at microchip.com
Sun Oct 13 02:54:59 PDT 2024
> >
> > 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
More information about the linux-arm-kernel
mailing list