Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1f1e70ef authored by Dan Carpenter's avatar Dan Carpenter Committed by David S. Miller
Browse files

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: 57ba4c9b ("fsl/fman: Add FMan MAC support")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8006f6bf
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -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);