mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
v4l2: close v4l2 device on error
The device needs to be closed when the enum_controls function is exited, but is not closed if the VIDIOC_QUERYCTRL fails. Fix it.
This commit is contained in:
parent
13ccccbfbd
commit
edd41d8259
1 changed files with 1 additions and 0 deletions
|
|
@ -1123,6 +1123,7 @@ spa_v4l2_enum_controls(struct impl *this, int seq,
|
|||
}
|
||||
res = -errno;
|
||||
spa_log_error(this->log, "'%s' VIDIOC_QUERYCTRL: %m", this->props.device);
|
||||
spa_v4l2_close(dev);
|
||||
return res;
|
||||
}
|
||||
if (result.next & next_fl)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue