Commit 88f0f09b authored by Dan Carpenter's avatar Dan Carpenter Committed by David S. Miller

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: abfcdc1d ("nfp: add a stats handler for flower offloads")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent da296769
...@@ -419,7 +419,7 @@ int nfp_flower_metadata_init(struct nfp_app *app) ...@@ -419,7 +419,7 @@ int nfp_flower_metadata_init(struct nfp_app *app)
return 0; return 0;
err_free_last_used: err_free_last_used:
kfree(priv->stats_ids.free_list.buf); kfree(priv->mask_ids.last_used);
err_free_mask_id: err_free_mask_id:
kfree(priv->mask_ids.mask_id_free_list.buf); kfree(priv->mask_ids.mask_id_free_list.buf);
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment