From cb16f5053fe7a2f04a6ceef9f32626549c8ee015 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Tue, 9 Apr 2024 11:42:06 +0200 Subject: [PATCH] cov: make obvious how free of memory happens When there is allocation, it needs also deallocator. Remove no longer needed coverity warning masking. --- test/unit/run.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/unit/run.c b/test/unit/run.c index 84b867be5..26f63bc5b 100644 --- a/test/unit/run.c +++ b/test/unit/run.c @@ -187,7 +187,7 @@ static void _run_test(struct test_details *t, bool use_colour, unsigned *passed, if (setjmp(test_k)) fprintf(stderr, "%s[ FAIL]%s %s\n", red(use_colour), normal(use_colour), t->path); else { - if (ts->fixture_init) + if (ts->fixture_init && ts->fixture_exit) fixture = ts->fixture_init(); else fixture = NULL; @@ -199,7 +199,6 @@ static void _run_test(struct test_details *t, bool use_colour, unsigned *passed, (*passed)++; fprintf(stderr, "%s[ OK]%s\n", green(use_colour), normal(use_colour)); - /* coverity[leaked_storage] fixture released by fixture_exit */ } }