Changeset 91634ec


Ignore:
Timestamp:
Mar 1, 2010, 8:15:48 PM (10 years ago)
Author:
Anders Kaseorg <andersk@mit.edu>
Branches:
master, release-1.6, release-1.7, release-1.8, release-1.9
Children:
516c27e
Parents:
b0da027
git-author:
Anders Kaseorg <andersk@mit.edu> (02/27/10 22:41:26)
git-committer:
Anders Kaseorg <andersk@mit.edu> (03/01/10 20:15:48)
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

    rb85c1c4 r91634ec  
    532532    owl_global_messagequeue_addmsg(&g, mout);
    533533  } else {
    534     owl_message_free(mout);
     534    owl_message_delete(mout);
    535535  }
    536536
  • logging.c

    rc79a047 r91634ec  
    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

    rce5d181 r91634ec  
    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 r91634ec  
    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

    r1915073 r91634ec  
    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.