Skip to content

Commit

Permalink
Remove unnecessary NULL pointer check in Cmd_RemoveCommand
Browse files Browse the repository at this point in the history
  • Loading branch information
zturtleman committed Apr 26, 2018
1 parent a82a99f commit 05758d5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions code/qcommon/cmd.c
Expand Up @@ -689,9 +689,7 @@ void Cmd_RemoveCommand( const char *cmd_name ) {
}
if ( !strcmp( cmd_name, cmd->name ) ) {
*back = cmd->next;
if (cmd->name) {
Z_Free(cmd->name);
}
Z_Free (cmd->name);
Z_Free (cmd);
return;
}
Expand Down

0 comments on commit 05758d5

Please sign in to comment.