android_kernel_samsung_a7y1.../sound/firewire
Wenwen Wang f4727e109a ALSA: firewire: fix a memory leak bug
commit 1be3c1fae6c1e1f5bb982b255d2034034454527a upstream.

In iso_packets_buffer_init(), 'b->packets' is allocated through
kmalloc_array(). Then, the aligned packet size is checked. If it is
larger than PAGE_SIZE, -EINVAL will be returned to indicate the error.
However, the allocated 'b->packets' is not deallocated on this path,
leading to a memory leak.

To fix the above issue, free 'b->packets' before returning the error code.

Fixes: 31ef9134eb52 ("ALSA: add LaCie FireWire Speakers/Griffin FireWave Surround driver")
Signed-off-by: Wenwen Wang <wenwen@cs.uga.edu>
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Cc: <stable@vger.kernel.org> # v2.6.39+
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-06 20:39:33 +02:00
..
bebob A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dice A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
digi00x A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
fireworks A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
oxfw A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
tascam A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
amdtp-am824.c ALSA: firewire-lib/fireworks: fix miss detection of received MIDI messages 2020-04-06 19:21:02 +02:00
amdtp-am824.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
amdtp-stream.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
amdtp-stream.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cmp.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cmp.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
fcp.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
fcp.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
isight.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
iso-resources.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
iso-resources.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Kconfig A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
lib.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
lib.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Makefile A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
packets-buffer.c ALSA: firewire: fix a memory leak bug 2020-04-06 20:39:33 +02:00
packets-buffer.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
scs1x.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30