This is an automated email from Gerrit. Adrian M Negreanu ([email protected]) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/5812
-- gerrit commit c2ca02cd5adfbfcac60603b052e4bc2b42fdb2dd Author: Adrian Negreanu <[email protected]> Date: Mon Aug 17 16:31:02 2020 +0300 openocd: free() doesn't need a check for NULL pointer Change-Id: I2372cd4e40ef206f9a4813ad4444d7b3a5cf6a6b Signed-off-by: Adrian Negreanu <[email protected]> diff --git a/src/helper/command.c b/src/helper/command.c index 271e7b9..e44630e 100644 --- a/src/helper/command.c +++ b/src/helper/command.c @@ -1125,10 +1125,9 @@ int help_add_command(struct command_context *cmd_ctx, struct command *parent, } if (help_text) { bool replaced = false; - if (nc->help) { - free(nc->help); + if (nc->help) replaced = true; - } + free(nc->help); nc->help = strdup(help_text); if (replaced) LOG_INFO("replaced existing '%s' help", cmd_name); -- _______________________________________________ OpenOCD-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openocd-devel
