if (hash_table_is_created(pw->users))
hash_table_destroy(&pw->users);
- if (pw->pool != NULL)
- pool_unref(&pw->pool);
+ pool_unref(&pw->pool);
}
static void passwd_file_free(struct passwd_file *pw)
hash_table_iterate_deinit(&brain->mailbox_states_iter);
hash_table_destroy(&brain->mailbox_states);
- if (brain->dsync_box_pool != NULL)
- pool_unref(&brain->dsync_box_pool);
+ pool_unref(&brain->dsync_box_pool);
if (brain->lock_fd != -1) {
/* unlink the lock file before it gets unlocked */
array_delete(&pipe->item_queue, 0, 1);
item = NULL;
- if (pipe->pop_pool != NULL)
- pool_unref(&pipe->pop_pool);
+ pool_unref(&pipe->pop_pool);
pipe->pop_pool = pipe->pop_item.pool;
return &pipe->pop_item;
}
pipe->remote->remote = NULL;
}
- if (pipe->pop_pool != NULL)
- pool_unref(&pipe->pop_pool);
+ pool_unref(&pipe->pop_pool);
array_foreach_modifiable(&pipe->item_queue, item) {
- if (item->pool != NULL)
- pool_unref(&item->pool);
+ pool_unref(&item->pool);
}
array_foreach_modifiable(&pipe->pools, poolp)
pool_unref(poolp);
static void sql_dict_transaction_free(struct sql_dict_transaction_context *ctx)
{
- if (ctx->inc_row_pool != NULL)
- pool_unref(&ctx->inc_row_pool);
+ pool_unref(&ctx->inc_row_pool);
i_free(ctx->prev_inc_key);
i_free(ctx->error);
i_free(ctx);
void fts_languages_deinit(void)
{
- if (fts_languages_pool != NULL)
- pool_unref(&fts_languages_pool);
+ pool_unref(&fts_languages_pool);
}
void fts_language_register(const char *name)
{
if (parser->header_parser != NULL)
http_header_parser_deinit(&parser->header_parser);
- if (parser->msg.pool != NULL)
- pool_unref(&parser->msg.pool);
+ pool_unref(&parser->msg.pool);
i_stream_unref(&parser->payload);
i_stream_unref(&parser->input);
}
http_header_parser_reset(parser->header_parser);
}
- if (parser->msg.pool != NULL)
- pool_unref(&parser->msg.pool);
+ pool_unref(&parser->msg.pool);
i_zero(&parser->msg);
if (pool != NULL) {
parser->msg.pool = pool;
i_assert(map->refcount == 0);
mail_index_record_map_unlink(map);
- if (map->extension_pool != NULL)
- pool_unref(&map->extension_pool);
+ pool_unref(&map->extension_pool);
if (array_is_created(&map->keyword_idx_map))
array_free(&map->keyword_idx_map);
buffer_free(&map->hdr_copy_buf);
message_parser_deinit(&astream->parser, &parts);
}
hash_format_deinit_free(&astream->set.hash_format);
- if (astream->pool != NULL)
- pool_unref(&astream->pool);
+ pool_unref(&astream->pool);
if (close_parent)
i_stream_close(astream->istream.parent);
}
if (bstream->parser != NULL) {
message_parser_deinit(&bstream->parser, &parts);
}
- if (bstream->pool != NULL)
- pool_unref(&bstream->pool);
+ pool_unref(&bstream->pool);
if (close_parent)
i_stream_close(bstream->istream.parent);
}
cass_iterator_free(result->iterator);
if (result->statement != NULL)
cass_statement_free(result->statement);
- if (result->row_pool != NULL)
- pool_unref(&result->row_pool);
+ pool_unref(&result->row_pool);
i_free(result->query);
i_free(result->error);
i_free(result);
{
if (ctx->commit_request != NULL)
sqlpool_request_abort(&ctx->commit_request);
- if (ctx->query_pool != NULL)
- pool_unref(&ctx->query_pool);
+ pool_unref(&ctx->query_pool);
i_free(ctx);
}
{
i_assert(file->refcount == 0);
- if (file->metadata_pool != NULL)
- pool_unref(&file->metadata_pool);
+ pool_unref(&file->metadata_pool);
dbox_file_close(file);
i_free(file->primary_path);
i_free(file->alt_path);
{
struct sdbox_file *sfile = (struct sdbox_file *)file;
- if (sfile->attachment_pool != NULL)
- pool_unref(&sfile->attachment_pool);
+ pool_unref(&sfile->attachment_pool);
dbox_file_free(file);
}
ret = mail_search_args_foreach(args,
search_mimepart_arg, &mpctx);
- if (mpctx.pool != NULL)
- pool_unref(&mpctx.pool);
+ pool_unref(&mpctx.pool);
if (mpctx.buf != NULL)
str_free(&mpctx.buf);
return ret;
maildir_uidlist_close(uidlist);
hash_table_destroy(&uidlist->files);
- if (uidlist->record_pool != NULL)
- pool_unref(&uidlist->record_pool);
+ pool_unref(&uidlist->record_pool);
array_free(&uidlist->records);
str_free(&uidlist->hdr_extensions);
uidlist->files = ctx->files;
i_zero(&ctx->files);
- if (uidlist->record_pool != NULL)
- pool_unref(&uidlist->record_pool);
+ pool_unref(&uidlist->record_pool);
uidlist->record_pool = ctx->record_pool;
ctx->record_pool = NULL;
if (hash_table_is_created(ctx->files))
hash_table_destroy(&ctx->files);
- if (ctx->record_pool != NULL)
- pool_unref(&ctx->record_pool);
+ pool_unref(&ctx->record_pool);
if (array_is_created(&ctx->records))
array_free(&ctx->records);
i_free(ctx);
{
struct pop3c_mailbox *mbox = POP3C_MAILBOX(box);
- if (mbox->uidl_pool != NULL)
- pool_unref(&mbox->uidl_pool);
+ pool_unref(&mbox->uidl_pool);
i_free_and_null(mbox->msg_uids);
i_free_and_null(mbox->msg_sizes);
pop3c_client_deinit(&mbox->client);
pool_unref(&dir->pool);
}
- if (ctx->info_pool != NULL)
- pool_unref(&ctx->info_pool);
+ pool_unref(&ctx->info_pool);
pool_unref(&_ctx->pool);
return ret;
}
DLLIST_REMOVE(&box->storage->mailboxes, box);
mail_storage_obj_unref(box->storage);
- if (box->metadata_pool != NULL)
- pool_unref(&box->metadata_pool);
+ pool_unref(&box->metadata_pool);
pool_unref(&box->pool);
}
/* Store changes temporarily so that plugins overriding
transaction_commit() can look at them. */
ret = mailbox_transaction_commit_get_changes(t, &changes);
- if (changes.pool != NULL)
- pool_unref(&changes.pool);
+ pool_unref(&changes.pool);
return ret;
}
void env_deinit(void)
{
- if (env_pool != NULL)
- pool_unref(&env_pool);
+ pool_unref(&env_pool);
}
return;
client->destroyed = TRUE;
- if (client->preproxy_pool != NULL)
- pool_unref(&client->preproxy_pool);
+ pool_unref(&client->preproxy_pool);
if (!client->login_success && reason != NULL) {
const char *extra_reason =
const unsigned char *data;
size_t size;
- if (proxy->client->preproxy_pool != NULL)
- pool_unref(&proxy->client->preproxy_pool);
+ pool_unref(&proxy->client->preproxy_pool);
i_assert(proxy->client_fd == -1);
i_assert(proxy->server_input != NULL);
if (array_is_created(&aclobj->aclobj.rights))
array_free(&aclobj->aclobj.rights);
- if (aclobj->aclobj.rights_pool != NULL)
- pool_unref(&aclobj->aclobj.rights_pool);
+ pool_unref(&aclobj->aclobj.rights_pool);
i_free(aclobj->aclobj.name);
i_free(aclobj);
}
mailbox_free(<->dest_box);
if (hash_table_is_created(lt->guids))
hash_table_destroy(<->guids);
- if (lt->pool != NULL)
- pool_unref(<->pool);
+ pool_unref(<->pool);
i_free(lt->delayed_errstr);
i_free(lt->delayed_internal_errstr);
i_free(lt);
file_dotlock_delete(&client->session_dotlock);
timeout_remove(&client->to_session_dotlock_refresh);
- if (client->uidl_pool != NULL)
- pool_unref(&client->uidl_pool);
+ pool_unref(&client->uidl_pool);
i_free(client->message_sizes);
i_free(client->deleted_bitmask);
i_free(client->seen_bitmask);