mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-10-22 19:14:51 +00:00
iio: accel: hid-sensor-accel-3d: Fix memory leak in probe()
[ Upstream commit b136faff9b ]
'channels' is allocated via kmemdup and it is never freed in the
subsequent error paths.
Use 'indio_dev->channels' directly instead, so that we avoid such
memory leak problem.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
This commit is contained in:
parent
1ca8e343d2
commit
e125aa4484
1 changed files with 6 additions and 7 deletions
Loading…
Add table
Add a link
Reference in a new issue