Skip to content

Commit

Permalink
staging: gdm72xx: potential use after free in send_qos_list()
Browse files Browse the repository at this point in the history
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: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Dan Carpenter authored and Greg Kroah-Hartman committed Jul 23, 2013
1 parent 3a349ce commit f2a6fed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/gdm72xx/gdm_qos.c
Original file line number Diff line number Diff line change
Expand Up @@ -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_del(&entry->list);
free_qos_entry(entry);
gdm_wimax_send_tx(entry->skb, entry->dev);
free_qos_entry(entry);
}
}

Expand Down

0 comments on commit f2a6fed

Please sign in to comment.