Skip to content
Commit 668205b9 authored by HW He's avatar HW He Committed by David S. Miller
Browse files

net: wwan: mhi: fix memory leak in mhi_mbim_dellink



MHI driver registers network device without setting the
needs_free_netdev flag, and does NOT call free_netdev() when
unregisters network device, which causes a memory leak.

This patch sets needs_free_netdev to true when registers
network device, which makes netdev subsystem call free_netdev()
automatically after unregister_netdevice().

Fixes: aa730a99 ("net: wwan: Add MHI MBIM network driver")
Signed-off-by: default avatarHW He <hw.he@mediatek.com>
Signed-off-by: default avatarZhaoping Shu <zhaoping.shu@mediatek.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f25caaca
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