vladimirvivien / go4vl

A Go library for working with the Video for Linux API (V4L2).
MIT License
245 stars 45 forks source link

not all code paths in device.Open close the underline device on error #55

Open rgl opened 1 year ago

rgl commented 1 year ago

Not all the code paths call v4l2.CloseDevice when there is an error at:

https://github.com/vladimirvivien/go4vl/blob/v0.0.5/device/device.go#L28-L116

All the return statements that return an error should call v4l2.CloseDevice.

vladimirvivien commented 12 months ago

Thank you for this @rgl . Will take a look.