]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: Fix memory leak in test-mail-storage
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Wed, 24 May 2017 19:31:59 +0000 (22:31 +0300)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Wed, 24 May 2017 19:31:59 +0000 (22:31 +0300)
src/lib-storage/test-mail-storage.c

index 3e43f695bb03cf36fd4a0a46fd5bdbb18ede4a27..dce223b495445a7767496b45a70eaeb5c1b38f58 100644 (file)
@@ -102,6 +102,8 @@ static void test_mail_storage_errors(void)
        test_assert(!storage.last_error_is_internal);
 
        mail_storage_clear_error(&storage);
+       i_assert(array_count(&storage.error_stack) == 0);
+       array_free(&storage.error_stack);
        test_end();
 }
 
@@ -169,6 +171,8 @@ static void test_mail_storage_last_error_push_pop(void)
        test_assert(!storage.last_error_is_internal);
 
        mail_storage_clear_error(&storage);
+       i_assert(array_count(&storage.error_stack) == 0);
+       array_free(&storage.error_stack);
        test_end();
 }