This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/cgit.cgi/v4l-utils.git tree:

Subject: v4l2-ctl: in streaming_set_m2m, close file pointers upon error
Author:  Dafna Hirschfeld <daf...@gmail.com>
Date:    Wed Mar 6 13:17:47 2019 -0800

In streaming_set_m2m, make sure to close all file pointers
and file descriptors before returning.

Signed-off-by: Dafna Hirschfeld <daf...@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-ci...@xs4all.nl>

 utils/v4l2-ctl/v4l2-ctl-streaming.cpp | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

---

http://git.linuxtv.org/cgit.cgi/v4l-utils.git/commit/?id=c11082a346f8879acd92cb6e5b41b4eb49828113
diff --git a/utils/v4l2-ctl/v4l2-ctl-streaming.cpp 
b/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
index 271cfaccb198..d8186749c915 100644
--- a/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
@@ -2145,18 +2145,19 @@ static void streaming_set_m2m(cv4l_fd &fd, cv4l_fd 
&exp_fd)
 
        if (options[OptStreamDmaBuf]) {
                if (exp_q.reqbufs(&exp_fd, reqbufs_count_cap))
-                       return;
+                       goto done;
                exp_fd_p = &exp_fd;
        }
 
        if (options[OptStreamOutDmaBuf]) {
                if (exp_q.reqbufs(&exp_fd, reqbufs_count_out))
-                       return;
+                       goto done;
                if (out.export_bufs(&exp_fd, exp_fd.g_type()))
-                       return;
+                       goto done;
        }
        stateful_m2m(fd, in, out, file[CAP], file[OUT], exp_fd_p);
 
+done:
        if (options[OptStreamDmaBuf] || options[OptStreamOutDmaBuf])
                exp_q.close_exported_fds();
 

_______________________________________________
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to