aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/wfx/sta.c
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2019-11-02 16:59:45 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-11-03 13:43:40 +0100
commit1878c5b91430d38a0beefd0dc5cb6035913ebc7f (patch)
treea94fe9208a6a4de8117a228f5140bdccebba3465 /drivers/staging/wfx/sta.c
parentstaging: exfat: Fix logical operation continuation (diff)
downloadlinux-dev-1878c5b91430d38a0beefd0dc5cb6035913ebc7f.tar.xz
linux-dev-1878c5b91430d38a0beefd0dc5cb6035913ebc7f.zip
staging: wfx: Fix a memory leak in 'wfx_upload_beacon'
The current code is a no-op, because all it can do is 'dev_kfree_skb(NULL)' Remove the test before 'dev_kfree_skb()' Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://lore.kernel.org/r/20191102155945.20205-1-christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wfx/sta.c')
-rw-r--r--drivers/staging/wfx/sta.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c
index 688586e823c0..93f3739b5f3a 100644
--- a/drivers/staging/wfx/sta.c
+++ b/drivers/staging/wfx/sta.c
@@ -906,8 +906,7 @@ static int wfx_upload_beacon(struct wfx_vif *wvif)
wfx_fwd_probe_req(wvif, false);
done:
- if (!skb)
- dev_kfree_skb(skb);
+ dev_kfree_skb(skb);
return ret;
}