linux-stable/drivers/atm
Zhipeng Lu 15393c8fd3 atm: idt77252: fix a memleak in open_card_ubr0
[ Upstream commit f3616173bf ]

When alloc_scq fails, card->vcs[0] (i.e. vc) should be freed. Otherwise,
in the following call chain:

idt77252_init_one
  |-> idt77252_dev_open
        |-> open_card_ubr0
              |-> alloc_scq [failed]
  |-> deinit_card
        |-> vfree(card->vcs);

card->vcs is freed and card->vcs[0] is leaked.

Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Signed-off-by: Zhipeng Lu <alexious@zju.edu.cn>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-02-23 08:54:57 +01:00
..
.gitignore
Kconfig
Makefile
adummy.c
ambassador.c
ambassador.h
atmtcp.c
eni.c atm: eni: Add check for dma_map_single 2022-03-23 09:16:41 +01:00
eni.h
firestream.c atm: firestream: check the return value of ioremap() in fs_init() 2022-03-19 13:47:49 +01:00
firestream.h
fore200e.c atm: fore200e: Fix fall-through warnings for Clang 2021-05-17 18:50:49 -05:00
fore200e.h
he.c
he.h
horizon.c atm: horizon: Fix spelling mistakes in TX comment 2021-08-08 12:58:42 +01:00
horizon.h
idt77105.c
idt77105.h
idt77252.c atm: idt77252: fix a memleak in open_card_ubr0 2024-02-23 08:54:57 +01:00
idt77252.h
idt77252_tables.h
iphase.c atm: iphase: Do PCI error checks on own line 2023-11-28 16:56:18 +00:00
iphase.h atm: Replace custom isprint() with generic analogue 2021-05-10 14:51:01 -07:00
lanai.c
midway.h
nicstar.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-06-29 15:45:27 -07:00
nicstar.h
nicstarmac.c
nicstarmac.copyright
solos-attrlist.c
solos-pci.c atm: solos-pci: Fix potential deadlock on &tx_queue_lock 2023-12-20 15:17:35 +01:00
suni.c
suni.h
tonga.h
uPD98401.h
uPD98402.c
uPD98402.h
zatm.c
zatm.h
zeprom.h atm: Fix typo 2021-05-21 13:55:32 -07:00