Skip to content

Commit

Permalink
firestream: Fix memleak in fs_open
Browse files Browse the repository at this point in the history
[ Upstream commit 15ac5cdafb9202424206dc5bd376437a358963f9 ]

When make_rate() fails, vcc should be freed just
like other error paths in fs_open().

Signed-off-by: Dinghao Liu <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
  • Loading branch information
dinghaoliu authored and gregkh committed Sep 23, 2020
1 parent 8d35eff commit 5e3b182
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 @@ -1013,6 +1013,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 5e3b182

Please sign in to comment.