aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2019-03-29 10:52:25 +0100
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2019-03-29 16:05:15 +0100
commit0cdc407b37e1263a31b5225c9c1221b27314f75d (patch)
tree31ead13292afc5adde329991e2bc783e3eaf8955
parentcde64b979f21f1ee45e164fce865e072db7167d0 (diff)
v4l2-ctl: add missing cleanup to stateless_m2m()
stateless_m2m() didn't free allocated resources. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
-rw-r--r--utils/v4l2-ctl/v4l2-ctl-streaming.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/utils/v4l2-ctl/v4l2-ctl-streaming.cpp b/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
index 948b820c..6d8e4fbc 100644
--- a/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
@@ -2501,6 +2501,15 @@ static void stateless_m2m(cv4l_fd &fd, cv4l_queue &in, cv4l_queue &out,
}
index = (index + 1) % out.g_buffers();
}
+
+ fcntl(fd.g_fd(), F_SETFL, fd_flags);
+ fprintf(stderr, "\n");
+
+ fd.streamoff(in.g_type());
+ fd.streamoff(out.g_type());
+ in.free(&fd);
+ out.free(&fd);
+ tpg_free(&tpg);
}
static void streaming_set_m2m(cv4l_fd &fd, cv4l_fd &exp_fd)

Privacy Policy