diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2013-07-22 11:00:53 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-07-23 15:08:50 -0700 |
commit | f2a6fed1ceaecf6054627f0ddbd4becf43c997fc (patch) | |
tree | d3c8b786a76aa3305ada0efb3b93368eaec688e3 /drivers/staging | |
parent | 3a349cee593a464b25f329a1b76635900187fdb0 (diff) | |
download | linux-f2a6fed1ceaecf6054627f0ddbd4becf43c997fc.tar.bz2 |
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: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/gdm72xx/gdm_qos.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/gdm72xx/gdm_qos.c b/drivers/staging/gdm72xx/gdm_qos.c index b795353e8348..cc3692439a5c 100644 --- a/drivers/staging/gdm72xx/gdm_qos.c +++ b/drivers/staging/gdm72xx/gdm_qos.c @@ -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); } } |