linux/drivers/iio/light
Alexey Khoroshilov 1c795ebd00 iio/adjd_s311: Fix potential memory leak in adjd_s311_update_scan_mode()
Do not leak memory by updating pointer with potentially NULL realloc return value.
There is no need to preserve data in the buffer,
so replace krealloc() by kfree()-kmalloc() pair.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Acked-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-08-16 20:24:33 +01:00
..
adjd_s311.c iio/adjd_s311: Fix potential memory leak in adjd_s311_update_scan_mode() 2012-08-16 20:24:33 +01:00
Kconfig iio: add adjd_s311 I2C digital color sensor driver 2012-07-12 17:45:34 +01:00
lm3533-als.c
Makefile iio: add adjd_s311 I2C digital color sensor driver 2012-07-12 17:45:34 +01:00
vcnl4000.c iio: add vcnl4000 combined ALS and proximity sensor 2012-06-20 16:12:46 -07:00