]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Memory leak fix (by Diego Liziero)
authorTimo Sirainen <tss@iki.fi>
Mon, 10 Mar 2008 01:09:06 +0000 (03:09 +0200)
committerTimo Sirainen <tss@iki.fi>
Mon, 10 Mar 2008 01:09:06 +0000 (03:09 +0200)
--HG--
branch : HEAD

src/lib-index/mail-transaction-log.c

index 383e4b6fbde261b1f35a10fd1bc3d10c4e3ab059..08642be1a01247646310d459ea69895dafcc8b2e 100644 (file)
@@ -383,8 +383,10 @@ int mail_transaction_log_find_file(struct mail_transaction_log *log,
        path = t_strconcat(log->index->filepath,
                           MAIL_TRANSACTION_LOG_SUFFIX".2", NULL);
        file = mail_transaction_log_file_alloc(log, path);
-       if ((ret = mail_transaction_log_file_open(file, TRUE)) <= 0)
+       if ((ret = mail_transaction_log_file_open(file, TRUE)) <= 0) {
+               mail_transaction_log_file_free(&file);
                return ret;
+       }
 
        /* but is it what we expected? */
        if (file->hdr.file_seq != file_seq)