[Dovecot] dict: Leaked a t_pop() call in I/O handler

Sergio Lopez sergio.lopez at nologin.es
Mon Dec 10 11:20:41 EET 2007


Hello,

I've just installed another postfix+dovecot based mail service (I
love dovecot! :-), and I found this message "dict: Leaked a t_pop()
call in I/O handler (nil)" being logged each time I authenticate
against it via POP3 or IMAP.

Searching through the code, I've found this (this is Dovecot v1.0.8): 

---- src/dict/dict-cache.c ----
void dict_cache_unref(struct dict_cache *cache, const char *uri,
                      const char *username)
{
        struct dict_entry *entry;

        t_push();
        entry = hash_lookup(cache->dicts,
                            t_strdup_printf("%s\t%s", username, uri));
        i_assert(entry != NULL && entry->refcount > 0);

        if (--entry->refcount == 0) {
                hash_remove(cache->dicts, entry->user_uri);
                dict_deinit(&entry->dict);
                i_free(entry->user_uri);
                i_free(entry);
        }
}
---- src/dict/dict-cache.c ----

Notice the "t_push()" call there. So calling t_pop() somewhere before
the end of the function, makes dovecot work like a charm (again).


P.D: I'm really surprised that nobody noticed this before. Am I
the only man in the world who uses Dovecot storing quota information
into a SQL Database? ;-)

-- 
Sergio López - <sergio.lopez at nologin.es>
Nologin Consulting S.L. - http://nologin.es


More information about the dovecot mailing list