chg parsing free Thanks @doegox!

This commit is contained in:
iceman1001 2020-06-02 13:27:54 +02:00
commit 7064b73b48
2 changed files with 7 additions and 9 deletions

View file

@ -146,11 +146,8 @@ int CLIParserParseStringEx(CLIParserContext *ctx, const char *str, void *vargtab
}
void CLIParserFree(CLIParserContext *ctx) {
if (ctx != NULL) {
arg_freetable(ctx->argtable, ctx->argtableLen);
free(ctx);
ctx = NULL;
}
arg_freetable(ctx->argtable, ctx->argtableLen);
free(ctx);
}
// convertors