projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eb1bd49
)
Staging: bcm: avoid use-after-free in bcm_char_ioctl()
author
Xi Wang
<xi.wang@gmail.com>
Wed, 6 Mar 2013 21:32:25 +0000
(16:32 -0500)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Mon, 11 Mar 2013 16:15:32 +0000
(09:15 -0700)
Free pBulkBuffer (pvBuffer) after pBulkBuffer->Register.
Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/bcm/Bcmchar.c
patch
|
blob
|
history
diff --git
a/drivers/staging/bcm/Bcmchar.c
b/drivers/staging/bcm/Bcmchar.c
index 491e2bfbc46487a51cbb4e62ef71613876b0cddb..35641e529396759d5e7c860457155b28fde21f94 100644
(file)
--- a/
drivers/staging/bcm/Bcmchar.c
+++ b/
drivers/staging/bcm/Bcmchar.c
@@
-1148,8
+1148,8
@@
cntrlEnd:
if (((ULONG)pBulkBuffer->Register & 0x0F000000) != 0x0F000000 ||
((ULONG)pBulkBuffer->Register & 0x3)) {
- kfree(pvBuffer);
BCM_DEBUG_PRINT (Adapter, DBG_TYPE_PRINTK, 0, 0, "WRM Done On invalid Address : %x Access Denied.\n", (int)pBulkBuffer->Register);
+ kfree(pvBuffer);
Status = -EINVAL;
break;
}