From 5dc5495d9a109f67e4d0fe06a8cf292b33f56128 Mon Sep 17 00:00:00 2001 From: Lin Bai Date: Mon, 9 Jul 2018 10:19:06 +0800 Subject: [PATCH] qcacld-3.0: Allocate/Free skb in same function The skb used for HW-mode-change vendor event will be freed twice in failure scenario. To avoid this, just keep the free in same function as allocation. CRs-Fixed: 2274784 Change-Id: Ibd37bc9787470da6de93c87a16c4c3bed7d1f78e --- core/hdd/src/wlan_hdd_cfg80211.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 842537923555..d01b5c09d351 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -13935,7 +13935,6 @@ static int wlan_hdd_fill_intf_info(struct sk_buff *skb, return 0; error: hdd_err("Fill buffer with interface info failed"); - kfree_skb(skb); return -EINVAL; } @@ -13999,7 +13998,6 @@ static int wlan_hdd_fill_mac_info(struct sk_buff *skb, return 0; error: hdd_err("Fill buffer with mac info failed"); - kfree_skb(skb); return -EINVAL; }