GNOME Bugzilla – Bug 721268
v4l2: Handle v4l2_ioctl() errors even in error handling
Last modified: 2014-01-06 10:02:58 UTC
Coverity reported this: ** CID 1146960: Unchecked return value (CHECKED_RETURN) /gst-plugins-good/sys/v4l2/gstv4l2object.c: 2334 in gst_v4l2_object_get_nearest_size() /gst-plugins-good/sys/v4l2/gstv4l2object.c: 2339 in gst_v4l2_object_get_nearest_size() In gst_v4l2_object_get_nearest_size() there is a workaround to retrieve the current format and save it, then probe a new format and then restore the saved format at the end of the function. The calls fail to check the return valueto v4l2_ioctl() when restoring the saved format. This patch adds the checks and prints a GST_WARNING when the call fails.
Created attachment 265066 [details] [review] Proposed patch checking for errors and unifying the code paths
commit 3f8b4235168dea3314c9d0d77bb3f23cf8eb9713 Author: Sebastian Rasmussen <sebras@hotmail.com> Date: Tue Dec 31 13:31:52 2013 +0100 v4l2: Handle v4l2_ioctl() errors even in error handling Fixes https://bugzilla.gnome.org/show_bug.cgi?id=721268