Skip to content

Commit

Permalink
wl12xx: use after free in debug code
Browse files Browse the repository at this point in the history
If debugging is turned on, then wl1271_dump() dereferences a freed
variable.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
  • Loading branch information
Dan Carpenter authored and Luciano Coelho committed Jan 24, 2011
1 parent 3c2c04a commit 0dd3866
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wireless/wl12xx/spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ static void wl1271_spi_reset(struct wl1271 *wl)
spi_message_add_tail(&t, &m);

spi_sync(wl_to_spi(wl), &m);
kfree(cmd);

wl1271_dump(DEBUG_SPI, "spi reset -> ", cmd, WSPI_INIT_CMD_LEN);
kfree(cmd);
}

static void wl1271_spi_init(struct wl1271 *wl)
Expand Down

0 comments on commit 0dd3866

Please sign in to comment.