diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2016-11-24 12:20:43 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-11-26 02:29:48 +0100 |
commit | 1f1e70efe53c01844ce76d77c3383c2bcb6beb49 (patch) | |
tree | a75299efb444c275514d8853c9c88b8853b4e261 | |
parent | net: ethtool: don't require CAP_NET_ADMIN for ETHTOOL_GLINKSETTINGS (diff) | |
download | linux-1f1e70efe53c01844ce76d77c3383c2bcb6beb49.tar.xz linux-1f1e70efe53c01844ce76d77c3383c2bcb6beb49.zip |
fsl/fman: fix a leak in tgec_free()
We set "tgec->cfg" to NULL before passing it to kfree(). There is no
need to set it to NULL at all. Let's just delete it.
Fixes: 57ba4c9b56d8 ("fsl/fman: Add FMan MAC support")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/freescale/fman/fman_tgec.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/net/ethernet/freescale/fman/fman_tgec.c b/drivers/net/ethernet/freescale/fman/fman_tgec.c index efabb04a1ae8..4b0f3a50b293 100644 --- a/drivers/net/ethernet/freescale/fman/fman_tgec.c +++ b/drivers/net/ethernet/freescale/fman/fman_tgec.c @@ -722,9 +722,6 @@ int tgec_free(struct fman_mac *tgec) { free_init_resources(tgec); - if (tgec->cfg) - tgec->cfg = NULL; - kfree(tgec->cfg); kfree(tgec); |