IMAP: fix leak