projects
/
platform
/
upstream
/
gst-plugins-good.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
985897d
)
v4l2: minor fix for closing the fd
author
Tim-Philipp Müller
<tim@centricular.com>
Mon, 5 May 2014 11:07:25 +0000
(12:07 +0100)
committer
Tim-Philipp Müller
<tim@centricular.com>
Mon, 5 May 2014 11:07:25 +0000
(12:07 +0100)
The fd returned by open() could theoretically be 0 as well.
Coverity CID 1211823.
sys/v4l2/gstv4l2.c
patch
|
blob
|
history
diff --git
a/sys/v4l2/gstv4l2.c
b/sys/v4l2/gstv4l2.c
index
9ded33d
..
fc36d18
100644
(file)
--- a/
sys/v4l2/gstv4l2.c
+++ b/
sys/v4l2/gstv4l2.c
@@
-102,7
+102,7
@@
gst_v4l2_probe_and_register (GstPlugin * plugin)
GstCaps *src_caps, *sink_caps;
gchar *basename;
- if (video_fd > 0)
+ if (video_fd >
=
0)
close (video_fd);
video_fd = open (it->device_path, O_RDWR);
@@
-158,7
+158,7
@@
gst_v4l2_probe_and_register (GstPlugin * plugin)
break;
}
- if (video_fd > 0)
+ if (video_fd >
=
0)
close (video_fd);
gst_v4l2_iterator_free (it);