test: fix some idiotic UB

This commit is contained in:
wm4 2020-05-02 17:39:18 +02:00
parent b2720dba0f
commit e567d06377
1 changed files with 3 additions and 3 deletions

View File

@ -33,9 +33,6 @@ static void run(struct test_ctx *ctx)
repack_test_run(stest);
talloc_free(stest);
talloc_free(zimg);
FILE *f = test_open_out(ctx, "zimg_formats.txt");
init_imgfmts_list();
for (int n = 0; n < num_imgfmts; n++) {
@ -51,6 +48,9 @@ static void run(struct test_ctx *ctx)
assert_text_files_equal(stest->ctx, "zimg_formats.txt", "zimg_formats.txt",
"This can fail if FFmpeg/libswscale adds or removes pixfmts.");
talloc_free(stest);
talloc_free(zimg);
}
const struct unittest test_repack_zimg = {