diff options
| author | Dan Carpenter <dan.carpenter@oracle.com> | 2020-11-05 15:51:54 +0300 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2020-11-10 17:28:25 +0000 |
| commit | 4e59dd249cd513a211e2ecce2cb31f4e29a5ce5b (patch) | |
| tree | db796adcaf177bf737bdae5182ab3e45c62b33c0 /net/lapb/lapb_iface.c | |
| parent | 048751de568816de52dedf0fa967cceada7885f1 (diff) | |
ASoC: qcom: common: Fix refcounting in qcom_snd_parse_of()
There are two issues in this function.
1) We can't drop the refrences on "cpu", "codec" and "platform" before
we take the reference. This doesn't cause a problem on the first
iteration because those pointers start as NULL so the of_node_put()
is a no-op. But on the subsequent iterations, it will lead to a use
after free.
2) If the devm_kzalloc() allocation failed then the code returned
directly instead of cleaning up.
Fixes: c1e6414cdc37 ("ASoC: qcom: common: Fix refcount imbalance on error")
Fixes: 1e36ea360ab9 ("ASoC: qcom: common: use modern dai_link style")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20201105125154.GA176426@mwanda
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'net/lapb/lapb_iface.c')
0 files changed, 0 insertions, 0 deletions
