Changeset ddbbcffa for message.c


Ignore:
Timestamp:
Feb 11, 2011, 4:31:42 PM (10 years ago)
Author:
Anders Kaseorg <andersk@mit.edu>
Branches:
master, release-1.8, release-1.9
Children:
d4927a7
Parents:
35b6eb9
git-author:
Anders Kaseorg <andersk@mit.edu> (08/27/09 00:52:41)
git-committer:
Anders Kaseorg <andersk@mit.edu> (02/11/11 16:31:42)
Message:
Replace owl_free with g_free.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-by: Karl Ramm <kcr@mit.edu>
File:
1 edited

Legend:

Unmodified
Added
Removed
  • message.c

    r96828e4 rddbbcffa  
    6868    p=owl_list_get_element(&(m->attributes), i);
    6969    if (owl_pair_get_key(p) == attrname) {
    70       owl_free(owl_pair_get_value(p));
     70      g_free(owl_pair_get_value(p));
    7171      pair = p;
    7272      break;
     
    134134    }
    135135    owl_fmtext_append_normal(fm, buff);
    136     owl_free(buff);
     136    g_free(buff);
    137137  }
    138138}
     
    611611      out = g_list_prepend(out, owl_strdup(user));
    612612    }
    613     owl_free(shortuser);
     613    g_free(shortuser);
    614614    user = strtok(NULL, " ");
    615615  }
    616616
    617   owl_free(recip);
    618   owl_free(cc);
     617  g_free(recip);
     618  g_free(cc);
    619619
    620620  return(out);
     
    749749      /* Collapse any identical entries */
    750750      while (cc->next && strcasecmp(cc->data, cc->next->data) == 0) {
    751         owl_free(cc->data);
     751        g_free(cc->data);
    752752        cc = g_list_delete_link(cc, cc);
    753753      }
     
    756756      g_string_append(recips, tmp);
    757757
    758       owl_free(tmp);
    759       owl_free(cc->data);
     758      g_free(tmp);
     759      g_free(cc->data);
    760760      cc = g_list_delete_link(cc, cc);
    761761
     
    793793 
    794794  /* save the time, we need to nuke the string saved by message_init */
    795   if (m->timestr) owl_free(m->timestr);
     795  if (m->timestr) g_free(m->timestr);
    796796  m->time=n->z_time.tv_sec;
    797797  m->timestr=owl_strdup(ctime(&(m->time)));
     
    821821      tmp=owl_zephyr_get_field(n, 1);
    822822      owl_message_set_attribute(m, "loginhost", tmp);
    823       owl_free(tmp);
     823      g_free(tmp);
    824824
    825825      tmp=owl_zephyr_get_field(n, 3);
    826826      owl_message_set_attribute(m, "logintty", tmp);
    827       owl_free(tmp);
     827      g_free(tmp);
    828828    }
    829829
     
    868868    tmp2=owl_util_stripnewlines(tmp);
    869869    owl_message_set_body(m, tmp2);
    870     owl_free(tmp2);
     870    g_free(tmp2);
    871871  } else {
    872872    owl_message_set_body(m, tmp);
    873873  }
    874   owl_free(tmp);
     874  g_free(tmp);
    875875
    876876  /* if zcrypt is enabled try to decrypt the message */
     
    891891
    892892    rv = call_filter(zcrypt, argv, owl_message_get_body(m), &out, &status);
    893     owl_free(zcrypt);
     893    g_free(zcrypt);
    894894
    895895    if(!rv && !status) {
     
    899899      }
    900900      owl_message_set_body(m, out);
    901       owl_free(out);
     901      g_free(out);
    902902    } else if(out) {
    903       owl_free(out);
     903      g_free(out);
    904904    }
    905905  }
     
    957957  owl_function_debugmsg("create_pseudo_login: host is %s", host ? host : "");
    958958  owl_message_set_hostname(m, host ? host : "");
    959   owl_free(longuser);
     959  g_free(longuser);
    960960}
    961961
     
    978978    owl_message_set_recipient(m,
    979979                              longzuser); /* only gets the first user, must fix */
    980     owl_free(longzuser);
     980    g_free(longzuser);
    981981  }
    982982  owl_message_set_opcode(m, owl_zwrite_get_opcode(z));
     
    987987  replyline = owl_zwrite_get_replyline(z);
    988988  owl_message_set_zwriteline(m, replyline);
    989   owl_free(replyline);
     989  g_free(replyline);
    990990
    991991  owl_message_set_body(m, body);
     
    10181018  }
    10191019#endif
    1020   if (m->timestr) owl_free(m->timestr);
     1020  if (m->timestr) g_free(m->timestr);
    10211021
    10221022  /* free all the attributes */
     
    10241024  for (i=0; i<j; i++) {
    10251025    p=owl_list_get_element(&(m->attributes), i);
    1026     owl_free(owl_pair_get_value(p));
    1027     owl_free(p);
     1026    g_free(owl_pair_get_value(p));
     1027    g_free(p);
    10281028  }
    10291029
     
    10361036{
    10371037  owl_message_cleanup(m);
    1038   owl_free(m);
    1039 }
     1038  g_free(m);
     1039}
Note: See TracChangeset for help on using the changeset viewer.