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

Commit b37e0c61 authored by Vasiliy Kulikov's avatar Vasiliy Kulikov Committed by Greg Kroah-Hartman
Browse files

staging: wlags49_h2: use free_netdev(netdev) instead of kfree()

Freeing netdev without free_netdev() leads to net, tx leaks.
I might lead to dereferencing freed pointer.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/

)

@@
struct net_device* dev;
@@

-kfree(dev)
+free_netdev(dev)

Signed-off-by: default avatarVasiliy Kulikov <segooon@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent c95aef41
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1586,7 +1586,7 @@ void wl_wds_device_dealloc( struct wl_private *lp )
                dev_wds->flags &= ~( IFF_UP | IFF_RUNNING );
            }

            kfree( dev_wds );
            free_netdev(dev_wds);
            lp->wds_port[count].dev = NULL;
        }
    }