diff options
author | Pauli Virtanen <pav@iki.fi> | 2022-06-05 15:29:27 +0300 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2022-06-13 10:52:28 -0700 |
commit | 9c288dd23a3bbd4a4e41c69882f5f18212da62b5 (patch) | |
tree | 4a488ae21270c8200e7370b86c75abc1137b85c4 /profiles | |
parent | 5f9d9a9a0b38d7fdbd591c859b9bf9e437fb1b39 (diff) | |
download | bluez-9c288dd23a3bbd4a4e41c69882f5f18212da62b5.tar.gz |
a2dp: error return paths in a2dp_reconfig must free allocated setup
Diffstat (limited to 'profiles')
-rw-r--r-- | profiles/audio/a2dp.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/profiles/audio/a2dp.c b/profiles/audio/a2dp.c index f3e2cdd9e..276512208 100644 --- a/profiles/audio/a2dp.c +++ b/profiles/audio/a2dp.c @@ -1876,8 +1876,10 @@ static int a2dp_reconfig(struct a2dp_channel *chan, const char *sender, if (tmp->stream) { /* Only allow switching sep from the same sender */ if (strcmp(sender, tmp->endpoint->get_name(tmp, - tmp->user_data))) - return -EPERM; + tmp->user_data))) { + err = -EPERM; + goto fail; + } /* Check if stream is for the channel */ if (!avdtp_has_stream(chan->session, tmp->stream)) |