linux-stable/drivers/i2c
Yingjoe Chen 8bf2a24467 i2c: dev: fix potential memory leak in i2cdev_ioctl_rdwr
[ Upstream commit a0692f0eef ]

If I2C_M_RECV_LEN check failed, msgs[i].buf allocated by memdup_user
will not be freed. Pump index up so it will be freed.

Fixes: 838bfa6049 ("i2c-dev: Add support for I2C_M_RECV_LEN")
Signed-off-by: Yingjoe Chen <yingjoe.chen@mediatek.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-06-22 08:16:17 +02:00
..
algos i2c: algo-bit: add support for I2C_M_STOP 2017-06-23 20:45:43 +02:00
busses i2c: acorn: fix i2c warning 2019-06-19 08:20:55 +02:00
muxes License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
i2c-boardinfo.c i2c: i2c-boardinfo: fix memory leaks on devinfo 2018-02-03 17:39:07 +01:00
i2c-core-acpi.c i2c: core: ACPI: Properly set status byte to 0 for multi-byte writes 2018-08-24 13:09:23 +02:00
i2c-core-base.c i2c/mux, locking/core: Annotate the nested rt_mutex usage 2018-09-05 09:26:29 +02:00
i2c-core-of.c i2c: Convert to using %pOF instead of full_name 2017-07-31 17:19:35 +02:00
i2c-core-slave.c i2c: break out slave support into separate file 2017-05-31 21:01:03 +02:00
i2c-core-smbus.c i2c: core-smbus: prevent stack corruption on read I2C_BLOCK_DATA 2018-01-23 19:58:17 +01:00
i2c-core.h i2c: core: Allow empty id_table in ACPI case as well 2017-07-31 15:50:33 +02:00
i2c-dev.c i2c: dev: fix potential memory leak in i2cdev_ioctl_rdwr 2019-06-22 08:16:17 +02:00
i2c-mux.c i2c/mux, locking/core: Annotate the nested rt_mutex usage 2018-09-05 09:26:29 +02:00
i2c-slave-eeprom.c
i2c-smbus.c
i2c-stub.c i2c: stub: fix build warning regression 2017-06-15 23:22:11 +02:00