From a114a32d22736ddab28b516f767290fd1825e0aa Mon Sep 17 00:00:00 2001 From: Nicolas Dufresne Date: Thu, 17 Apr 2014 21:45:58 -0400 Subject: [PATCH] v4l2allocator: Valid FD are bigger or equal to zero --- sys/v4l2/gstv4l2allocator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/v4l2/gstv4l2allocator.c b/sys/v4l2/gstv4l2allocator.c index f2f92a11be..0c63e0e5cc 100644 --- a/sys/v4l2/gstv4l2allocator.c +++ b/sys/v4l2/gstv4l2allocator.c @@ -141,7 +141,7 @@ _v4l2mem_dispose (GstV4l2Memory * mem) static void _v4l2mem_free (GstV4l2Memory * mem) { - if (mem->dmafd > 0) + if (mem->dmafd >= 0) close (mem->dmafd); g_slice_free (GstV4l2Memory, mem); }