Text   |  XML   |  ReML   |   Visible Warnings:

Leak  at mbox-transaction.c:95

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

mbox_transaction_created

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-storage/index/mbox/mbox-transaction.c)expand/collapse
Show more  
 78  static void mbox_transaction_created(struct mail_index_transaction *t)
 79  {
 80          struct mailbox *box = MAIL_STORAGE_CONTEXT(t->view);
 81   
 82          /* index can be for mailbox list index, in which case box=NULL */
 83          if (box != NULL && strcmp(box->storage->name, MBOX_STORAGE_NAME) == 0) {
 84                  struct mbox_mailbox *mbox = (struct mbox_mailbox *)box;
 85                  struct mbox_transaction_context *mt;
 86   
 87                  mt = i_new(struct mbox_transaction_context, 1);
 88                  mt->ictx.trans = t;
 89                  mt->ictx.super = t->v;
 90   
 91                  t->v.commit = mbox_transaction_commit;
 92                  t->v.rollback = mbox_transaction_rollback;
 93[+]                 MODULE_CONTEXT_SET(t, mail_storage_mail_index_module, mt);
 94   
 95[+]                 index_transaction_init(&mt->ictx, &mbox->ibox);
expand/collapse

index_transaction_init

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-storage/index/index-transaction.c)expand/collapse
Show more  
 8  void index_transaction_init(struct index_transaction_context *t,
 9                              struct index_mailbox *ibox)
 10  {
 11          t->mailbox_ctx.box = &ibox->box;
 12          t->ibox = ibox;
 13   
 14          array_create(&t->mailbox_ctx.module_contexts, default_pool,
 15                       sizeof(void *), 5);
 16   
 17[+]         t->trans_view = mail_index_transaction_open_updated_view(t->trans);
expand/collapse

mail_index_transaction_open_updated_view

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-index/mail-index-transaction-view.c)expand/collapse
Show more  
 453  struct mail_index_view *
 454  mail_index_transaction_open_updated_view(struct mail_index_transaction *t)
 455  {
 456          struct mail_index_view_transaction *tview;
 457   
 458          if (t->view->syncing) {
 459                  /* transaction view is being synced. while it's done, it's not 
 460                     possible to add new messages, but the view itself might 
 461                     change. so we can't make a copy of the view. */
 462                  mail_index_view_ref(t->view);
 463                  return t->view;
 464          }
 465   
 466[+]         tview = i_new(struct mail_index_view_transaction, 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  
 467[+]         mail_index_view_clone(&tview->view, t->view);
 468          tview->view.v = trans_view_vfuncs;
 469          tview->super = &t->view->v;
 470          tview->t = t;
 471   
 472          mail_index_transaction_ref(t);
 473          return &tview->view;
Show more  
 18[+]         t->cache_view = mail_cache_view_open(ibox->cache, t->trans_view);
 19[+]         t->cache_trans = mail_cache_get_transaction(t->cache_view, t->trans);
 20  }
Show more  
 96          }
 97   
 98          if (next_hook_mail_index_transaction_created != NULL)
 99                  next_hook_mail_index_transaction_created(t);
 100  }
Show more  




Change Warning 11678.24720 : Leak

Because they are very similar, this warning shares annotations with warning 11678.24721.

Priority:
State:
Finding:
Owner:
Note: