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:
Michael Tretter 2022-06-24 11:24:18 +02:00 committed by Wim Taymans
parent 13ccccbfbd
commit edd41d8259

View file

@ -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)