aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2012-06-24 12:37:04 +0200
committerHans Verkuil <hans.verkuil@cisco.com>2012-06-24 12:37:04 +0200
commita066e7312c0e49da0ec46ae0157922521e6cc6df (patch)
treee67da3c8624d9f9f350654c8fed46cb60608106b
parentc6684f2b621280c77b022544945727c7c48888bc (diff)
v4l2-compliance: fix segfault.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
-rw-r--r--utils/v4l2-compliance/v4l2-compliance.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/utils/v4l2-compliance/v4l2-compliance.cpp b/utils/v4l2-compliance/v4l2-compliance.cpp
index 3ccd533d..5497caa5 100644
--- a/utils/v4l2-compliance/v4l2-compliance.cpp
+++ b/utils/v4l2-compliance/v4l2-compliance.cpp
@@ -651,7 +651,8 @@ int main(int argc, char **argv)
/* Final test report */
test_close(node.fd);
- test_close(node.node2->fd);
+ if (node.node2)
+ test_close(node.node2->fd);
printf("Total: %d Succeeded: %d Failed: %d Warnings: %d\n",
tests_total, tests_ok, tests_total - tests_ok, warnings);
exit(app_result);

Privacy Policy