Skip to content

Commit

Permalink
firestream: Fix memleak in fs_open
Browse files Browse the repository at this point in the history
When make_rate() fails, vcc should be freed just
like other error paths in fs_open().

Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Dinghao Liu authored and David S. Miller committed Aug 25, 2020
1 parent e2d79cd commit 15ac5cd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/atm/firestream.c
Original file line number Diff line number Diff line change
Expand Up @@ -998,6 +998,7 @@ static int fs_open(struct atm_vcc *atm_vcc)
error = make_rate (pcr, r, &tmc0, NULL);
if (error) {
kfree(tc);
kfree(vcc);
return error;
}
}
Expand Down

0 comments on commit 15ac5cd

Please sign in to comment.