]> git.baikalelectronics.ru Git - kernel.git/commitdiff
wimax: i2400: fix memory leak
authorNavid Emamdoost <navid.emamdoost@gmail.com>
Tue, 10 Sep 2019 23:01:40 +0000 (18:01 -0500)
committerDavid S. Miller <davem@davemloft.net>
Wed, 11 Sep 2019 08:10:13 +0000 (09:10 +0100)
In i2400m_op_rfkill_sw_toggle cmd buffer should be released along with
skb response.

Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/wimax/i2400m/op-rfkill.c

index 6642bcb27761d63e8545865c1e2c91097cf9e5c2..8efb493ceec2fc96cda43cb56cde5e6d19e91015 100644 (file)
@@ -127,6 +127,7 @@ int i2400m_op_rfkill_sw_toggle(struct wimax_dev *wimax_dev,
                        "%d\n", result);
        result = 0;
 error_cmd:
+       kfree(cmd);
        kfree_skb(ack_skb);
 error_msg_to_dev:
 error_alloc: