linux/drivers/i3c
Wenwen Wang 7afe9a4e56 i3c: master: fix a memory leak bug
In i3c_master_getmwl_locked(), the buffer used for the dest payload data is
allocated using kzalloc() in i3c_ccc_cmd_dest_init(). Later on, the length
of the dest payload data is checked against 'sizeof(*mwl)'. If they are not
equal, -EIO is returned to indicate the error. However, the allocated
buffer is not deallocated on this path, leading to a memory leak.

To fix the above issue, free the buffer before returning the error.

Signed-off-by: Wenwen Wang <wenwen@cs.uga.edu>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
2019-08-12 10:11:29 +02:00
..
master i3c: add addr and lvr to i2c_dev_desc structure 2019-08-11 10:48:28 +02:00
device.c i3c: move i3c_device_match_id to device.c and export it 2019-07-27 11:22:19 +02:00
internals.h
Kconfig
Makefile
master.c i3c: master: fix a memory leak bug 2019-08-12 10:11:29 +02:00