summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/netronome/nfp/flower/metadata.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2017-07-12 09:42:06 +0200
committerDavid S. Miller <davem@davemloft.net>2017-07-12 17:18:14 +0200
commit88f0f09b3ab7d817b897cedbd7a05a565ff4f75a (patch)
treeddff66561153cd34ed31f681bf48516f5a0bcabb /drivers/net/ethernet/netronome/nfp/flower/metadata.c
parentMerge branch 'mlxsw-spectrum-Various-fixes' (diff)
downloadlinux-88f0f09b3ab7d817b897cedbd7a05a565ff4f75a.tar.xz
linux-88f0f09b3ab7d817b897cedbd7a05a565ff4f75a.zip
nfp: freeing the wrong variable
We accidentally free a NULL pointer and leak the pointer we want to free. Also you can tell from the label name what was intended. :) Fixes: abfcdc1de9bf ("nfp: add a stats handler for flower offloads") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/netronome/nfp/flower/metadata.c')
-rw-r--r--drivers/net/ethernet/netronome/nfp/flower/metadata.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/netronome/nfp/flower/metadata.c b/drivers/net/ethernet/netronome/nfp/flower/metadata.c
index fec0ff2ca94f..3226ddc55f99 100644
--- a/drivers/net/ethernet/netronome/nfp/flower/metadata.c
+++ b/drivers/net/ethernet/netronome/nfp/flower/metadata.c
@@ -419,7 +419,7 @@ int nfp_flower_metadata_init(struct nfp_app *app)
return 0;
err_free_last_used:
- kfree(priv->stats_ids.free_list.buf);
+ kfree(priv->mask_ids.last_used);
err_free_mask_id:
kfree(priv->mask_ids.mask_id_free_list.buf);
return -ENOMEM;