]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: Fix event leak when failing to create storage
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Thu, 26 Apr 2018 20:05:21 +0000 (23:05 +0300)
committerMartti Rannanjärvi <martti.rannanjarvi@open-xchange.com>
Tue, 11 Dec 2018 22:56:34 +0000 (00:56 +0200)
src/lib-storage/mail-storage.c

index 838f16a98033fa311e3f057de8022d4737181c3c..3609259c0bda41f5167e53ba1efd54c7f617093a 100644 (file)
@@ -428,6 +428,7 @@ int mail_storage_create_full(struct mail_namespace *ns, const char *driver,
        if (storage->v.create != NULL &&
            storage->v.create(storage, ns, error_r) < 0) {
                *error_r = t_strdup_printf("%s: %s", storage->name, *error_r);
+               event_unref(&storage->event);
                pool_unref(&storage->pool);
                return -1;
        }