Skip to content

Fix memleaks of saslconn on error paths

Peter Wu requested to merge Lekensteyn/mutt:sasl-memleak-fixes into master

If mutt_sasl_client_new returns an error, the callers would ignore the allocated saslconn resource from sasl_client_new. Be sure to release these with sasl_dispose as documented in sasl.h. Likewise, let callers (POP/IMAP) dispose the resource on their error paths. SMTP was already taken care of. Found with LeakSanitizer in IMAP.

Merge request reports