Text   |  XML   |  ReML   |   Visible Warnings:

Leak  at mail-index-map.c:1184

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

mail_index_map_move_to_memory

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-index/mail-index-map.c)expand/collapse
Show more  
 1170  void mail_index_map_move_to_memory(struct mail_index_map *map)
 1171  {
 1172          struct mail_index_record_map *new_map;
 1173   
 1174          if (map->rec_map->mmap_base == NULL)
 1175                  return;
 1176   
 1177          i_assert(map->rec_map->lock_id != 0);
 1178   
 1179          if (array_count(&map->rec_map->maps) == 1)
 1180                  new_map = map->rec_map;
 1181          else {
 1182                  new_map = mail_index_record_map_alloc(map);
 1183                  new_map->modseq = map->rec_map->modseq == NULL ? NULL :
 1184[+]                         mail_index_map_modseq_clone(map->rec_map->modseq);
expand/collapse

mail_index_map_modseq_clone

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-index/mail-index-modseq.c)expand/collapse
Show more  
 611  struct mail_index_map_modseq *
 612  mail_index_map_modseq_clone(const struct mail_index_map_modseq *mmap)
 613  {
 614          struct mail_index_map_modseq *new_mmap;
 615          const struct  *;
 616          struct  *;
 617          unsigned int i, count;
 618   
 619           = array_get(&mmap->, &count);
 620   
 621[+]         new_mmap = i_new(struct mail_index_map_modseq, 1);
expand/collapse

i_malloc

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/imem.c)expand/collapse
Show more  
 7  void *i_malloc(size_t size)
 8  {
 9      void *rv = malloc(size);
 10      if( !rv )
 11          abort();
 12      return rv;
Show more  
 622[+]         i_array_init(&new_mmap->, count + 16);
 623   
 624          for (i = 0; i < count; i++) {
 625                   = array_append_space(&new_mmap->);
 626                  if (array_is_created(&[i].modseqs)) {
 627                          i_array_init(&->modseqs,
 628                                       array_count(&[i].modseqs));
 629                          array_append_array(&->modseqs,
 630                                             &[i].modseqs);
 631                  }
 632          }
 633          return new_mmap;
Show more  
 1185          }
 1186   
 1187          mail_index_map_copy_records(new_map, map->rec_map,
 1188[+]                                     map->hdr.record_size);
 1189          mail_index_map_copy_header(map, map);
 1190   
 1191          if (new_map != map->rec_map) {
 1192                  mail_index_record_map_unlink(map);
 1193                  map->rec_map = new_map;
 1194          } else {
 1195[+]                 mail_index_unlock(map->index, &new_map->lock_id);
 1196                  if (munmap(new_map->mmap_base, new_map->mmap_size) < 0)
 1197                          mail_index_set_syscall_error(map->index, "munmap()");
 1198                  new_map->mmap_base = NULL;
 1199          }
 1200  }
Show more  




Change Warning 11452.24993 : Leak

Priority:
State:
Finding:
Owner:
Note: