Changeset 3b8a563 for cmd.c


Ignore:
Timestamp:
May 20, 2011, 3:59:31 PM (10 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, release-1.8, release-1.9
Children:
fda61d3
Parents:
7865479
git-author:
David Benjamin <davidben@mit.edu> (05/07/11 15:12:09)
git-committer:
David Benjamin <davidben@mit.edu> (05/20/11 15:59:31)
Message:
Remove NULL checks before calling g_free

g_free handles the NULL check for us.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • cmd.c

    r6a71113 r3b8a563  
    135135void owl_cmd_cleanup(owl_cmd *cmd)
    136136{
    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);
     137  g_free(cmd->name);
     138  g_free(cmd->summary);
     139  g_free(cmd->usage);
     140  g_free(cmd->description);
     141  g_free(cmd->cmd_aliased_to);
    142142  if (cmd->cmd_perl) owl_perlconfig_cmd_cleanup(cmd);
    143143}
Note: See TracChangeset for help on using the changeset viewer.