}
}
+void mail_storage_deinit(void)
+{
+ struct mail_storage_list *next;
+
+ while (storages != NULL) {
+ next = storages->next;
+
+ i_free(storages);
+ storages = next;
+ }
+}
+
void mail_storage_class_register(struct mail_storage *storage_class)
{
struct mail_storage_list *list, **pos;
{
i_assert(storage != NULL);
- i_free(storage->dir);
- i_free(storage);
+ storage->free(storage);
}
void mail_storage_clear_error(struct mail_storage *storage)
tm = localtime(&ioloop_time);
+ i_free(storage->error);
storage->error = strftime(str, sizeof(str), CRITICAL_MSG, tm) > 0 ?
i_strdup(str) : i_strdup("Internal error");
storage->syntax_error = FALSE;
extern enum client_workarounds client_workarounds;
extern int full_filesystem_access;
-/* Initialize mail storage. */
void mail_storage_init(void);
+void mail_storage_deinit(void);
/* register all mail storages */
void mail_storage_register_all(void);
void io_loop_destroy(struct ioloop *ioloop)
{
+ pool_t pool;
+
while (ioloop->ios != NULL) {
struct io *io = ioloop->ios;
i_assert(ioloop == current_ioloop);
current_ioloop = current_ioloop->prev;
- pool_unref(ioloop->pool);
+ pool = ioloop->pool;
+ p_free(pool, ioloop);
+ pool_unref(pool);
}