mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-15 00:04:29 +08:00
client/player: add return value check of io_get_fd() to transport_timer_read()
It is necessary to add a return value check. Found with the SVACE static analysis tool.
This commit is contained in:
parent
922a8a8bd4
commit
537f96a283
@ -5016,6 +5016,11 @@ static bool transport_timer_read(struct io *io, void *user_data)
|
||||
return false;
|
||||
|
||||
fd = io_get_fd(io);
|
||||
if (fd < 0) {
|
||||
bt_shell_printf("io_get_fd() returned %d\n", fd);
|
||||
return false;
|
||||
}
|
||||
|
||||
ret = read(fd, &exp, sizeof(exp));
|
||||
if (ret < 0) {
|
||||
bt_shell_printf("Failed to read: %s (%d)\n", strerror(errno),
|
||||
|
Loading…
Reference in New Issue
Block a user