From 99a82cf7d2f87df85a1021ab1601a9853066f153 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Mon, 19 Apr 2021 23:31:11 +0200 Subject: [PATCH] coverity fixes --- client/src/cmdhfst.c | 7 ------- client/src/cmdtrace.c | 2 ++ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/client/src/cmdhfst.c b/client/src/cmdhfst.c index 2c0ffea31..b15c8e8b4 100644 --- a/client/src/cmdhfst.c +++ b/client/src/cmdhfst.c @@ -789,13 +789,6 @@ static int CmdHFSTPwd(const char *Cmd) { static int CmdHFSTList(const char *Cmd) { return CmdTraceListAlias(Cmd, "hf st", "7816"); - char args[128] = {0}; - if (strlen(Cmd) == 0) { - snprintf(args, sizeof(args), "-t 7816"); - } else { - strncpy(args, Cmd, sizeof(args) - 1); - } - return CmdTraceList(args); } static command_t CommandTable[] = { diff --git a/client/src/cmdtrace.c b/client/src/cmdtrace.c index 6792e2434..d70b23080 100644 --- a/client/src/cmdtrace.c +++ b/client/src/cmdtrace.c @@ -655,6 +655,8 @@ int CmdTraceListAlias(const char *Cmd, const char *alias, const char *protocol) arg_param_end }; CLIExecWithReturn(ctx, Cmd, argtable, true); + CLIParserFree(ctx); + char args[128] = {0}; snprintf(args, sizeof(args), "-t %s ", protocol); strncat(args, Cmd, sizeof(args) - strlen(args) - 1);