android_kernel_samsung_a7y1.../drivers/atm
Wenwen Wang d367408e58 firestream: fix memory leaks
[ Upstream commit fa865ba183d61c1ec8cbcab8573159c3b72b89a4 ]

In fs_open(), 'vcc' is allocated through kmalloc() and assigned to
'atm_vcc->dev_data.' In the following execution, if an error occurs, e.g.,
there is no more free channel, an error code EBUSY or ENOMEM will be
returned. However, 'vcc' is not deallocated, leading to memory leaks. Note
that, in normal cases where fs_open() returns 0, 'vcc' will be deallocated
in fs_close(). But, if fs_open() fails, there is no guarantee that
fs_close() will be invoked.

To fix this issue, deallocate 'vcc' before the error code is returned.

Signed-off-by: Wenwen Wang <wenwen@cs.uga.edu>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-07 13:44:33 +02:00
..
adummy.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ambassador.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ambassador.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
atmtcp.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
eni.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
eni.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
firestream.c firestream: fix memory leaks 2020-04-07 13:44:33 +02:00
firestream.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
fore200e.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
fore200e.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
he.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
he.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
horizon.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
horizon.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
idt77105.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
idt77105.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
idt77252_tables.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
idt77252.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
idt77252.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
iphase.c atm: iphase: Fix Spectre v1 vulnerability 2020-04-06 20:28:08 +02:00
iphase.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Kconfig Kconfig: Fix the reference to the IDT77105 Phy driver in the description of ATM_NICSTAR_USE_IDT77105 2020-04-06 21:36:26 +02:00
lanai.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Makefile A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
midway.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
nicstar.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
nicstar.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
nicstarmac.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
nicstarmac.copyright A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
solos-attrlist.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
solos-pci.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
suni.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
suni.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
tonga.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
uPD98401.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
uPD98402.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
uPD98402.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
zatm.c atm: zatm: Fix empty body Clang warnings 2020-04-07 12:35:08 +02:00
zatm.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
zeprom.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30