diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2022-11-21 13:01:46 -0800 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2022-11-21 13:03:04 -0800 |
commit | 5a872af406ca2d432e79d978f23a85771c7ce6ea (patch) | |
tree | 7daf53a2b1f85b5e4cb4bea0c877592fa8203337 /client | |
parent | 818adf28e51877f32befab1a7faca314f89aa199 (diff) | |
download | bluez-5a872af406ca2d432e79d978f23a85771c7ce6ea.tar.gz |
client/player: Fix scan-build warning
This fixes the following warning:
client/player.c:1775:25: warning: Dereference of null pointer
[core.NullDereference]
iov_append(&cfg->caps, preset->data.iov_base, preset->data.iov_len);
^~~~~~~~~~~~~~~~~~~~~
Diffstat (limited to 'client')
-rw-r--r-- | client/player.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/client/player.c b/client/player.c index 432408934..51c10f8e0 100644 --- a/client/player.c +++ b/client/player.c @@ -1745,6 +1745,9 @@ static DBusMessage *endpoint_select_properties_reply(struct endpoint *ep, DBusMessageIter iter; struct endpoint_config *cfg; + if (!preset) + return NULL; + reply = dbus_message_new_method_return(msg); if (!reply) return NULL; |