From 2daa2c09fd2265f8249c4ecddb2c894dfdff1e0f Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Tue, 2 Jun 2020 11:27:47 +0200 Subject: [PATCH] fix coverity 290266 --- client/deps/cliparser/cliparser.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/client/deps/cliparser/cliparser.c b/client/deps/cliparser/cliparser.c index c4795d870..1e379556d 100644 --- a/client/deps/cliparser/cliparser.c +++ b/client/deps/cliparser/cliparser.c @@ -146,9 +146,10 @@ int CLIParserParseStringEx(CLIParserContext *ctx, const char *str, void *vargtab } void CLIParserFree(CLIParserContext *ctx) { - arg_freetable(ctx->argtable, ctx->argtableLen); - free(ctx); - return; + if (ctx) { + arg_freetable(ctx->argtable, ctx->argtableLen); + free(ctx); + } } // convertors