Skip to content

Commit 80b15db

Browse files
Navidemgregkh
authored andcommitted
staging: vt6655: Fix memory leak in vt6655_probe
In vt6655_probe, if vnt_init() fails the cleanup code needs to be called like other error handling cases. The call to device_free_info() is added. Fixes: 67013f2 ("staging: vt6655: mac80211 conversion add main mac80211 functions") Signed-off-by: Navid Emamdoost <[email protected]> Cc: stable <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 6e58fc1 commit 80b15db

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/staging/vt6655/device_main.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1748,8 +1748,10 @@ vt6655_probe(struct pci_dev *pcid, const struct pci_device_id *ent)
17481748

17491749
priv->hw->max_signal = 100;
17501750

1751-
if (vnt_init(priv))
1751+
if (vnt_init(priv)) {
1752+
device_free_info(priv);
17521753
return -ENODEV;
1754+
}
17531755

17541756
device_print_info(priv);
17551757
pci_set_drvdata(pcid, priv);

0 commit comments

Comments
 (0)