Text   |  XML   |  ReML   |   Visible Warnings:

Leak  at mail-index.c:404

No properties have been set. | edit properties
Jump to warning location ↓ warning details...
Show Events | Options

mail_index_open

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-index/mail-index.c)expand/collapse
Show more  
 386  int mail_index_open(struct mail_index *index, enum mail_index_open_flags flags,
 387                      enum file_lock_method lock_method)
 388  {
 389          int ret;
 390   
 391          if (index->opened) {
 392                  if (index->map != NULL &&
 393                      (index->map->hdr.flags &
 394                       MAIL_INDEX_HDR_FLAG_CORRUPTED) != 0) {
 395                          /* corrupted, reopen files */
 396                          mail_index_close(index);
 397                  } else {
 398                          i_assert(index->map != NULL);
 399                          return 1;
 400                  }
 401          }
 402   
 403          index->filepath = MAIL_INDEX_IS_IN_MEMORY(index) ?
 404[+]                 i_strdup("(in-memory index)") :
expand/collapse

i_strdup

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/imem.c)expand/collapse
Show more  
 23  char *i_strdup(const char *str)
 24  {
 25      char *rv = strdup( str );
 26      if( !rv )
 27          abort();
 28      return rv;
Show more  
 405                  i_strconcat(index->dir, "/", index->prefix, NULL);
 406   
 407          index->shared_lock_count = 0;
 408          index->excl_lock_count = 0;
 409          index->lock_type = F_UNLCK;
 410          index->lock_id_counter = 2;
 411   
 412          index->readonly = FALSE;
 413          index->nodiskspace = FALSE;
 414          index->index_lock_timeout = FALSE;
 415          index->log_locked = FALSE;
 416          index->mmap_disable = (flags & MAIL_INDEX_OPEN_FLAG_MMAP_DISABLE) != 0;
 417          index->use_excl_dotlocks =
 418                  (flags & MAIL_INDEX_OPEN_FLAG_DOTLOCK_USE_EXCL) != 0;
 419          index->fsync_disable =
 420                  (flags & MAIL_INDEX_OPEN_FLAG_FSYNC_DISABLE) != 0;
 421          index->nfs_flush = (flags & MAIL_INDEX_OPEN_FLAG_NFS_FLUSH) != 0;
 422          index->readonly = (flags & MAIL_INDEX_OPEN_FLAG_READONLY) != 0;
 423          index->lock_method = lock_method;
 424   
 425          if (index->nfs_flush && index->fsync_disable)
 426                  i_fatal("nfs flush requires fsync_disable=no");
 427          if (index->nfs_flush && !index->mmap_disable)
 428                  i_fatal("nfs flush requires mmap_disable=yes");
 429   
 430[+]         if ((ret = mail_index_open_files(index, flags)) <= 0) {
expand/collapse

mail_index_open_files

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-index/mail-index.c)expand/collapse
Show more  
 331  static int mail_index_open_files(struct mail_index *index,
 332                                   enum mail_index_open_flags flags)
 333  {
 334          int ret;
 335          bool created = FALSE;
 336   
 337          ret = mail_transaction_log_open(index->log);
 338          if (ret == 0) {
 339                  if ((flags & MAIL_INDEX_OPEN_FLAG_CREATE) == 0)
 340                          return 0;
 341   
 342                  /* if dovecot.index exists, read it first so that we can get
 343                     the correct indexid and log sequence */
 344                  (void)mail_index_try_open(index);
Show more  
Show more  




Change Warning 7236.25820 : Leak

Priority:
State:
Finding:
Owner:
Note: