]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
iio: pressure: hid-sensor-press: Fix memory leak in probe()
authorFabio Estevam <fabio.estevam@freescale.com>
Wed, 13 May 2015 18:06:14 +0000 (15:06 -0300)
committerJonathan Cameron <jic23@kernel.org>
Sun, 17 May 2015 08:10:33 +0000 (09:10 +0100)
commitc24e7daf823256c83ce3efe6fa9b9b8ab5b78480
treee47a7700d2a5e1f59053362ca9fbe2c2f6039611
parent2bd04628435ff57a2fefa71e7d3e5c005db5c978
iio: pressure: hid-sensor-press: Fix memory leak in probe()

'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>
drivers/iio/pressure/hid-sensor-press.c