mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-23 21:19:04 -04:00
greybus: zero all data buffers
Don't assume the buffer data area will all be overwritten. Zero all buffer space, to avoid sending crap over the wire. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
This commit is contained in:
parent
170229d195
commit
a7901d5ef7
1 changed files with 1 additions and 1 deletions
|
|
@ -113,7 +113,7 @@ static int alloc_gbuf_data(struct gbuf *gbuf, unsigned int size,
|
|||
* CPort Id before the data; set aside an extra byte for
|
||||
* that purpose in that case.
|
||||
*/
|
||||
buffer = kmalloc(cport_reserve + size, gfp_mask);
|
||||
buffer = kzalloc(cport_reserve + size, gfp_mask);
|
||||
if (!buffer)
|
||||
return -ENOMEM;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue