projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fbfcdf2
)
Staging: bcm: Fix memory leak reported during compile.
author
Kevin McKinney
<klmckinney1@gmail.com>
Tue, 16 Aug 2011 02:12:15 +0000
(22:12 -0400)
committer
Greg Kroah-Hartman
<gregkh@suse.de>
Tue, 23 Aug 2011 22:20:53 +0000
(15:20 -0700)
This patch fixes a potential memory leak were temp_buff buffer
is not being freed when a certain condition is true.
Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/bcm/Bcmchar.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/staging/bcm/Bcmchar.c
b/drivers/staging/bcm/Bcmchar.c
index d3f3856e2dcc19dcaa1909e59546d52fa85ef734..6f8a75dc1ef04b8d94abcc35f42bbe5d0c075452 100644
(file)
--- a/
drivers/staging/bcm/Bcmchar.c
+++ b/
drivers/staging/bcm/Bcmchar.c
@@
-304,6
+304,8
@@
static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg)
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "RDM Done On invalid Address : %x Access Denied.\n",
(int)sRdmBuffer.Register);
+
+ kfree(temp_buff);
return -EINVAL;
}