android_kernel_samsung_a7y1.../drivers/net/wimax/i2400m
Navid Emamdoost d6b07f39eb wimax: i2400: Fix memory leak in i2400m_op_rfkill_sw_toggle
commit 6f3ef5c25cc762687a7341c18cbea5af54461407 upstream.

In the implementation of i2400m_op_rfkill_sw_toggle() the allocated
buffer for cmd should be released before returning. The
documentation for i2400m_msg_to_dev() says when it returns the buffer
can be reused. Meaning cmd should be released in either case. Move
kfree(cmd) before return to be reached by all execution paths.

Fixes: 2507e6ab7a9a ("wimax: i2400: fix memory leak")
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-07 13:36:34 +02:00
..
control.c
debug-levels.h
debugfs.c
driver.c
fw.c
i2400m-usb.h
i2400m.h
Kconfig
Makefile
netdev.c
op-rfkill.c wimax: i2400: Fix memory leak in i2400m_op_rfkill_sw_toggle 2020-04-07 13:36:34 +02:00
rx.c
sysfs.c
tx.c
usb-debug-levels.h
usb-fw.c
usb-notif.c
usb-rx.c
usb-tx.c
usb.c