]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib: test-mempool-alloconly - help static analyzer understand that pool is non-NULL
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Fri, 6 Oct 2017 11:48:37 +0000 (14:48 +0300)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Fri, 6 Oct 2017 11:48:37 +0000 (14:48 +0300)
src/lib/test-mempool-alloconly.c

index 6059bf5df0fbf57563f5d207f0d617d3840f7d42..5ecd79ca710c89f96d7105f9ef240498577af8c3 100644 (file)
@@ -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");