From: Timo Sirainen Date: Fri, 6 Oct 2017 11:48:37 +0000 (+0300) Subject: lib: test-mempool-alloconly - help static analyzer understand that pool is non-NULL X-Git-Tag: 2.3.0.rc1~877 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c77400ca35fef6a4ddb760c02706143ceda45a49;p=thirdparty%2Fdovecot%2Fcore.git lib: test-mempool-alloconly - help static analyzer understand that pool is non-NULL --- diff --git a/src/lib/test-mempool-alloconly.c b/src/lib/test-mempool-alloconly.c index 6059bf5df0..5ecd79ca71 100644 --- a/src/lib/test-mempool-alloconly.c +++ b/src/lib/test-mempool-alloconly.c @@ -57,6 +57,9 @@ enum fatal_test_state fatal_mempool_alloconly(unsigned int stage) { static pool_t pool; + if (pool == NULL && stage != 0) + return FATAL_TEST_FAILURE; + switch(stage) { case 0: /* forbidden size */ test_begin("fatal_mempool_alloconly");