Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • cmd.c

    r4c7c21f r6a71113  
    1212
    1313int owl_cmddict_setup(owl_cmddict *cd) {
    14   owl_cmddict_init(cd);
     14  if (0 != owl_cmddict_init(cd)) return(-1);
    1515  if (0 != owl_cmddict_add_from_list(cd, commands_to_init)) return(-1);
    1616  return(0);
    1717}
    1818
    19 void owl_cmddict_init(owl_cmddict *cd) {
    20   owl_dict_create(cd);
     19int owl_cmddict_init(owl_cmddict *cd) {
     20  if (owl_dict_create(cd)) return(-1);
     21  return(0);
    2122}
    2223
     
    134135void owl_cmd_cleanup(owl_cmd *cmd)
    135136{
    136   g_free(cmd->name);
    137   g_free(cmd->summary);
    138   g_free(cmd->usage);
    139   g_free(cmd->description);
    140   g_free(cmd->cmd_aliased_to);
     137  if (cmd->name) g_free(cmd->name);
     138  if (cmd->summary) g_free(cmd->summary);
     139  if (cmd->usage) g_free(cmd->usage);
     140  if (cmd->description) g_free(cmd->description);
     141  if (cmd->cmd_aliased_to) g_free(cmd->cmd_aliased_to);
    141142  if (cmd->cmd_perl) owl_perlconfig_cmd_cleanup(cmd);
    142143}
Note: See TracChangeset for help on using the changeset viewer.