From 05758d52f428696dd6e2d508a7a5f480601de8bc Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Sun, 22 Apr 2018 17:54:49 -0500 Subject: [PATCH] Remove unnecessary NULL pointer check in Cmd_RemoveCommand --- code/qcommon/cmd.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/code/qcommon/cmd.c b/code/qcommon/cmd.c index ae605f7b..b6b5a83c 100644 --- a/code/qcommon/cmd.c +++ b/code/qcommon/cmd.c @@ -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; }