Fix some missing frees, null dereferences and missing initialisation picked up by clang-analyzer

This commit is contained in:
nvx committed 2024-01-16 00:22:53 +10:00
1 parent 5db2276602
commit d2d6f80d11
11 files changed
+24 -15

No files matched your search

+2 -3
View File
@@ -281,12 +281,12 @@ static int CmdHFCryptoRFDump(const char *Cmd) {
bool m512 = arg_get_lit(ctx, 3);
CLIParserFree(ctx);
if (m512 + m64 > 1) {
if (m512 + m64 != 1) {
PrintAndLogEx(INFO, "Select only one card memory size");
return PM3_EINVARG;
}
uint16_t cardsize = 0;
uint16_t cardsize;
uint8_t blocks = 0;
if (m64) {
cardsize = (512 / 8) + 4;
@@ -550,4 +550,3 @@ int CmdHFCryptoRF(const char *Cmd) {
clearCommandBuffer();
return CmdsParse(CommandTable, Cmd);
}