Changes in cmd.c [4c7c21f:6a71113]
Legend:
- Unmodified
- Added
- Removed
-
cmd.c
r4c7c21f r6a71113 12 12 13 13 int owl_cmddict_setup(owl_cmddict *cd) { 14 owl_cmddict_init(cd);14 if (0 != owl_cmddict_init(cd)) return(-1); 15 15 if (0 != owl_cmddict_add_from_list(cd, commands_to_init)) return(-1); 16 16 return(0); 17 17 } 18 18 19 void owl_cmddict_init(owl_cmddict *cd) { 20 owl_dict_create(cd); 19 int owl_cmddict_init(owl_cmddict *cd) { 20 if (owl_dict_create(cd)) return(-1); 21 return(0); 21 22 } 22 23 … … 134 135 void owl_cmd_cleanup(owl_cmd *cmd) 135 136 { 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); 141 142 if (cmd->cmd_perl) owl_perlconfig_cmd_cleanup(cmd); 142 143 }
Note: See TracChangeset
for help on using the changeset viewer.