Changeset a96b109


Ignore:
Timestamp:
Mar 1, 2010, 8:33:50 PM (10 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
release-1.5
Children:
5e8bec6
Parents:
d89c61f
git-author:
Anders Kaseorg <andersk@mit.edu> (02/27/10 22:41:26)
git-committer:
Nelson Elhage <nelhage@mit.edu> (03/01/10 20:33:50)
Message:
Add owl_message_delete to fix leaks.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-by: Alejandro R. Sedeño <asedeno@mit.edu>
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • functions.c

    r5cebc0e ra96b109  
    551551    owl_global_messagequeue_addmsg(&g, mout);
    552552  } else {
    553     owl_message_free(mout);
     553    owl_message_delete(mout);
    554554  }
    555555
  • logging.c

    rc79a047 ra96b109  
    184184  owl_message_create_from_zwrite(m, zw, text);
    185185  if (!owl_log_shouldlog_message(m)) {
    186     owl_message_free(m);
    187     return;
    188   }
    189   owl_message_free(m);
     186    owl_message_delete(m);
     187    return;
     188  }
     189  owl_message_delete(m);
    190190
    191191  /* chop off a local realm */
  • message.c

    rdd8340b ra96b109  
    967967  owl_message_invalidate_format(m);
    968968}
     969
     970void owl_message_delete(owl_message *m)
     971{
     972  owl_message_free(m);
     973  owl_free(m);
     974}
  • messagelist.c

    r3eb599d ra96b109  
    7575    m=owl_list_get_element(&(ml->list), i);
    7676    if (owl_message_is_delete(m)) {
    77       owl_message_free(m);
     77      owl_message_delete(m);
    7878    } else {
    7979      owl_list_append_element(&newlist, m);
  • owl.c

    r8ea0ffc ra96b109  
    195195  /* if this message it on the puntlist, nuke it and continue */
    196196  if (owl_global_message_is_puntable(&g, m)) {
    197     owl_message_free(m);
     197    owl_message_delete(m);
    198198    return 0;
    199199  }
     
    202202  if (owl_global_is_ignorelogins(&g)
    203203      && owl_message_is_loginout(m)) {
    204     owl_message_free(m);
     204    owl_message_delete(m);
    205205    return 0;
    206206  }
     
    208208  if (!owl_global_is_displayoutgoing(&g)
    209209      && owl_message_is_direction_out(m)) {
    210     owl_message_free(m);
     210    owl_message_delete(m);
    211211    return 0;
    212212  }
Note: See TracChangeset for help on using the changeset viewer.