mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 00:34:52 +00:00
iio:buffer: Wrong sized allocation of demux table elements.
The size of the allocation is currently set to the size of the pointer rather than the structure we should actually be allocating. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Reported-by: kbuild@01.org Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de>
This commit is contained in:
parent
145b0a5d18
commit
7cdca1784c
1 changed files with 1 additions and 1 deletions
|
@ -951,7 +951,7 @@ static int iio_buffer_add_demux(struct iio_buffer *buffer,
|
|||
(*p)->to + (*p)->length == out_loc) {
|
||||
(*p)->length += length;
|
||||
} else {
|
||||
*p = kmalloc(sizeof(*p), GFP_KERNEL);
|
||||
*p = kmalloc(sizeof(**p), GFP_KERNEL);
|
||||
if (*p == NULL)
|
||||
return -ENOMEM;
|
||||
(*p)->from = in_loc;
|
||||
|
|
Loading…
Add table
Reference in a new issue