lkml.org 
[lkml]   [2020]   [Oct]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net-next 4/5] net: mscc: ocelot: make entry_type a member of struct ocelot_multicast
On Thu, 29 Oct 2020 04:27:37 +0200 Vladimir Oltean wrote:
> + mc = devm_kzalloc(ocelot->dev, sizeof(*mc), GFP_KERNEL);
> + if (!mc)
> + return -ENOMEM;
> +
> + mc->entry_type = ocelot_classify_mdb(mdb->addr);
> + ether_addr_copy(mc->addr, mdb->addr);
> + mc->vid = vid;
> +
> + pgid = ocelot_mdb_get_pgid(ocelot, mc);
>
> if (pgid < 0) {
> dev_err(ocelot->dev,
> @@ -1038,24 +1044,19 @@ int ocelot_port_mdb_add(struct ocelot *ocelot, int port,
> return -ENOSPC;
> }

Transitionally leaking mc here on pgid < 0

\
 
 \ /
  Last update: 2020-10-31 02:17    [W:0.105 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site