tests: set output_file to a valid value
authorLudovic Rousseau <ludovic.rousseau+github@gmail.com>
Sun, 22 Sep 2013 19:29:50 +0000 (21:29 +0200)
committerLudovic Rousseau <ludovic.rousseau+github@gmail.com>
Sat, 28 Sep 2013 10:19:16 +0000 (12:19 +0200)
commitc4f2c353b9a1f6bc418dcd1d330d7c99084570d5
treefa245a4d22ceb496eb4c76390fe2ba8d7f7d410c
parentc393574a0148a826e4be575c356b7b5724190c8c
tests: set output_file to a valid value

If fdopen(3) fails then ctx->output_file is NULL and should not be used
in cleanup_test_output() called next.

Problem detected by the Coverity tool
CID 1042543 (#1 of 1): Dereference after null check (FORWARD_NULL)9.
var_deref_model: Passing "ctx" to function
"cleanup_test_output(libusbx_testlib_ctx *)", which dereferences null
"ctx->output_file".
libusb/version_nano.h
tests/testlib.c