fix coverity 286922 mem leak

This commit is contained in:
iceman1001 2020-05-13 12:24:28 +02:00
parent 47d9a73fd4
commit 96108d826a

View file

@ -2474,7 +2474,11 @@ static int CmdHF14ADesWriteData(const char *Cmd) {
PrintAndLogEx(ERR, "failed to allocate memory");
return PM3_EMALLOC;
}
CLIGetHexWithReturn(4, data, &dlength);
if (CLIParamHexToBuf(arg_get_str(4), data, sizeof(data), &dlength)) {
free(data);
CLIParserFree();
return PM3_ESOFT;
}
int type = arg_get_int(5);