From: Timo Sirainen Date: Thu, 26 Apr 2018 20:05:21 +0000 (+0300) Subject: lib-storage: Fix event leak when failing to create storage X-Git-Tag: 2.3.9~1916 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dc26c62d7bdd6d361ba38ecf8f64a04b7c9e008e;p=thirdparty%2Fdovecot%2Fcore.git lib-storage: Fix event leak when failing to create storage --- diff --git a/src/lib-storage/mail-storage.c b/src/lib-storage/mail-storage.c index 94929108da..2bfbf0c065 100644 --- a/src/lib-storage/mail-storage.c +++ b/src/lib-storage/mail-storage.c @@ -429,6 +429,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; }