]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
staging: wfx: Fix a memory leak in 'wfx_upload_beacon'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 2 Nov 2019 15:59:45 +0000 (16:59 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 3 Nov 2019 12:43:40 +0000 (13:43 +0100)
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>
drivers/staging/wfx/sta.c

index 688586e823c0741562347846fd18eef585d8b643..93f3739b5f3adf1c7c677106aa95e409f58ff5e8 100644 (file)
@@ -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;
 }