fix coverity CID 317343,317344 ...
This commit is contained in:
@@ -243,6 +243,7 @@ static int generate_config_card(const iclass_config_card_item_t *o, uint8_t *ke
|
|||||||
|
|
||||||
if (got_kr == false) {
|
if (got_kr == false) {
|
||||||
PrintAndLogEx(ERR, "please specifiy KEYROLL key!");
|
PrintAndLogEx(ERR, "please specifiy KEYROLL key!");
|
||||||
|
free(data);
|
||||||
return PM3_EINVARG;
|
return PM3_EINVARG;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -269,6 +270,7 @@ static int generate_config_card(const iclass_config_card_item_t *o, uint8_t *ke
|
|||||||
PrintAndLogEx(INFO, "Detecting cardhelper...");
|
PrintAndLogEx(INFO, "Detecting cardhelper...");
|
||||||
if (IsCardHelperPresent(false) == false) {
|
if (IsCardHelperPresent(false) == false) {
|
||||||
PrintAndLogEx(FAILED, "failed to detect cardhelper");
|
PrintAndLogEx(FAILED, "failed to detect cardhelper");
|
||||||
|
free(data);
|
||||||
return PM3_ENODATA;
|
return PM3_ENODATA;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -335,6 +337,7 @@ static int generate_config_card(const iclass_config_card_item_t *o, uint8_t *ke
|
|||||||
saveFileJSON(filename, jsfIclass, data, tot_bytes, NULL);
|
saveFileJSON(filename, jsfIclass, data, tot_bytes, NULL);
|
||||||
|
|
||||||
PrintAndLogEx(HINT, "Try `" _YELLOW_("hf iclass view -f %s.bin") "` to view dump file", filename);
|
PrintAndLogEx(HINT, "Try `" _YELLOW_("hf iclass view -f %s.bin") "` to view dump file", filename);
|
||||||
|
free(data);
|
||||||
return PM3_SUCCESS;
|
return PM3_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user