mirror of https://gitee.com/openkylin/linux.git
61ab0d403b
In sst_prepare_and_post_msg(), when a response is received in "block",
the following code gets executed:
*data = kzalloc(block->size, GFP_KERNEL);
memcpy(data, (void *) block->data, block->size);
The memcpy() call overwrites the content of the *data pointer instead of
filling the newly-allocated memory (which pointer is hold by *data).
Fix this by merging kzalloc+memcpy into a single kmemdup() call.
Thanks Joe Perches for suggesting using kmemdup()
Fixes:
|
||
---|---|---|
.. | ||
sst | ||
Makefile | ||
sst-atom-controls.c | ||
sst-atom-controls.h | ||
sst-mfld-dsp.h | ||
sst-mfld-platform-compress.c | ||
sst-mfld-platform-pcm.c | ||
sst-mfld-platform.h |