From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail2.candelatech.com ([208.74.158.173]:46789 "EHLO mail2.candelatech.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751595AbaIYUtT (ORCPT ); Thu, 25 Sep 2014 16:49:19 -0400 Received: from [192.168.100.236] (firewall.candelatech.com [70.89.124.249]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail2.candelatech.com (Postfix) with ESMTPSA id 9A69F40C6EC for ; Thu, 25 Sep 2014 13:49:18 -0700 (PDT) Message-ID: <54247FCD.9060205@candelatech.com> (sfid-20140925_224922_471547_72DCB536) Date: Thu, 25 Sep 2014 13:49:17 -0700 From: Ben Greear MIME-Version: 1.0 To: "linux-wireless@vger.kernel.org" Subject: Memory leak in mac80211_hwsim? Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-wireless-owner@vger.kernel.org List-ID: While perusing the code in mac80211_hwsim, I notice what I think is a memory leak: Shouldn't there be an skb_free on the return result of skb_dequeue?? static void mac80211_hwsim_tx_frame_nl(struct ieee80211_hw *hw, struct sk_buff *my_skb, int dst_portid) { struct sk_buff *skb; struct mac80211_hwsim_data *data = hw->priv; struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) my_skb->data; struct ieee80211_tx_info *info = IEEE80211_SKB_CB(my_skb); void *msg_head; unsigned int hwsim_flags = 0; int i; struct hwsim_tx_rate tx_attempts[IEEE80211_TX_MAX_RATES]; if (data->ps != PS_DISABLED) hdr->frame_control |= cpu_to_le16(IEEE80211_FCTL_PM); /* If the queue contains MAX_QUEUE skb's drop some */ if (skb_queue_len(&data->pending) >= MAX_QUEUE) { /* Droping until WARN_QUEUE level */ while (skb_queue_len(&data->pending) >= WARN_QUEUE) skb_dequeue(&data->pending); } Thanks, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com