Skip to content

Commit

Permalink
lib-storage: Fix event leak when failing to create storage
Browse files Browse the repository at this point in the history
  • Loading branch information
sirainen authored and cmouse committed Apr 27, 2018
1 parent c336bb0 commit dc26c62
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/lib-storage/mail-storage.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit dc26c62

Please sign in to comment.