diff --git a/src/add-ons/mail_daemon/inbound_protocols/imap/IMAPProtocol.cpp b/src/add-ons/mail_daemon/inbound_protocols/imap/IMAPProtocol.cpp index 642e48261b..2bc869ba4b 100644 --- a/src/add-ons/mail_daemon/inbound_protocols/imap/IMAPProtocol.cpp +++ b/src/add-ons/mail_daemon/inbound_protocols/imap/IMAPProtocol.cpp @@ -296,6 +296,7 @@ IMAPProtocol::_CreateFolder(const BString& mailbox, const BString& separator) if (status != B_OK) { fprintf(stderr, "Initializing folder %s failed: %s\n", path.Path(), strerror(status)); + delete folder; return NULL; }