Commit f2a6fed1 authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman

staging: gdm72xx: potential use after free in send_qos_list()

Sometimes free_qos_entry() sometimes frees its argument.  I have moved
the dereference of "entry" ahead on line to avoid a use after free.
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3a349cee
...@@ -250,8 +250,8 @@ static void send_qos_list(struct nic *nic, struct list_head *head) ...@@ -250,8 +250,8 @@ static void send_qos_list(struct nic *nic, struct list_head *head)
list_for_each_entry_safe(entry, n, head, list) { list_for_each_entry_safe(entry, n, head, list) {
list_del(&entry->list); list_del(&entry->list);
free_qos_entry(entry);
gdm_wimax_send_tx(entry->skb, entry->dev); gdm_wimax_send_tx(entry->skb, entry->dev);
free_qos_entry(entry);
} }
} }
......
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