Skip to content

Commit

Permalink
net: wireless: bcmdhd: fix use-after-free in _dhd_pno_get_for_batch()
Browse files Browse the repository at this point in the history
Bug: 32838767
Change-Id: I987b07c30b3ed76865a002e7c154a5fa36b1bf29
Signed-off-by: Greg Hackmann <[email protected]>
  • Loading branch information
greghackmann authored and pattjin committed Dec 7, 2016
1 parent 8485190 commit 709105c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/net/wireless/bcmdhd/dhd_pno.c
Original file line number Diff line number Diff line change
Expand Up @@ -3069,9 +3069,10 @@ _dhd_pno_get_for_batch(dhd_pub_t *dhd, char *buf, int bufsize, int reason)
list_del(&pscan_results->list);
MFREE(dhd->osh, pscan_results, SCAN_RESULTS_SIZE);
_params->params_batch.get_batch.top_node_cnt--;
} else {
/* increase total scan count using current scan count */
_params->params_batch.get_batch.tot_scan_cnt += pscan_results->cnt_header;
}
/* increase total scan count using current scan count */
_params->params_batch.get_batch.tot_scan_cnt += pscan_results->cnt_header;

if (buf && bufsize) {
/* This is a first try to get batching results */
Expand Down

0 comments on commit 709105c

Please sign in to comment.