Commit 245b431b authored by Claudiu Beznea's avatar Claudiu Beznea Committed by Greg Kroah-Hartman

Staging: wilc1000: Freed memory in case of error

This patch frees memory allocated inside wilc_wlan_txq_add_cfg_pkt()
in case wilc_wlan_txq_add_to_head() fails.
Signed-off-by: default avatarClaudiu Beznea <claudiu.beznea@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8958f581
......@@ -325,8 +325,11 @@ static int wilc_wlan_txq_add_cfg_pkt(struct wilc_vif *vif, u8 *buffer,
tqe->priv = NULL;
tqe->tcp_pending_ack_idx = NOT_TCP_ACK;
if (wilc_wlan_txq_add_to_head(vif, tqe))
if (wilc_wlan_txq_add_to_head(vif, tqe)) {
kfree(tqe);
return 0;
}
return 1;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment