Changeset ddbbcffa for cmd.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
  • cmd.c

    r96828e4 rddbbcffa  
    4444void owl_cmddict_namelist_cleanup(owl_list *l)
    4545{
    46   owl_list_cleanup(l, owl_free);
     46  owl_list_cleanup(l, g_free);
    4747}
    4848
     
    6060  owl_cmd * newcmd = g_new(owl_cmd, 1);
    6161  if(owl_cmd_create_from_template(newcmd, cmd) < 0) {
    62     owl_free(newcmd);
     62    g_free(newcmd);
    6363    return -1;
    6464  }
     
    9191  argv=owl_parseline(tmpbuff, &argc);
    9292  if (argc < 0) {
    93     owl_free(tmpbuff);
     93    g_free(tmpbuff);
    9494    owl_function_makemsg("Unbalanced quotes");
    9595    return NULL;
     
    9898  if (argc < 1) {
    9999    owl_parse_delete(argv, argc);
    100     owl_free(tmpbuff);
     100    g_free(tmpbuff);
    101101    return NULL;
    102102  }
     
    105105
    106106  owl_parse_delete(argv, argc);
    107   owl_free(tmpbuff);
     107  g_free(tmpbuff);
    108108  return retval;
    109109}
     
    153153void owl_cmd_cleanup(owl_cmd *cmd)
    154154{
    155   if (cmd->name) owl_free(cmd->name);
    156   if (cmd->summary) owl_free(cmd->summary);
    157   if (cmd->usage) owl_free(cmd->usage);
    158   if (cmd->description) owl_free(cmd->description);
    159   if (cmd->cmd_aliased_to) owl_free(cmd->cmd_aliased_to);
     155  if (cmd->name) g_free(cmd->name);
     156  if (cmd->summary) g_free(cmd->summary);
     157  if (cmd->usage) g_free(cmd->usage);
     158  if (cmd->description) g_free(cmd->description);
     159  if (cmd->cmd_aliased_to) g_free(cmd->cmd_aliased_to);
    160160  if (cmd->cmd_perl) owl_perlconfig_cmd_cleanup(cmd);
    161161}
     
    164164{
    165165  owl_cmd_cleanup(cmd);
    166   owl_free(cmd);
     166  g_free(cmd);
    167167}
    168168
     
    188188      newcmd = owl_sprintf("%s %s", cmd->cmd_aliased_to, cmdbuffargs);
    189189      rv = owl_function_command(newcmd);
    190       owl_free(newcmd);
     190      g_free(newcmd);
    191191    }
    192192    alias_recurse_depth--;
     
    280280    owl_fmtext_append_normal(fm, indent);
    281281    owl_fmtext_append_normal(fm, "\n");
    282     owl_free(indent);
     282    g_free(indent);
    283283  } else {
    284284    owl_fmtext_append_bold(fm, "\nSYNOPSIS\n");
     
    294294    owl_fmtext_append_normal(fm, indent);
    295295    owl_fmtext_append_normal(fm, "\n");
    296     owl_free(indent);
     296    g_free(indent);
    297297  }
    298298
Note: See TracChangeset for help on using the changeset viewer.