This commit is contained in:
iceman1001 2022-02-15 20:10:39 +01:00
commit a8175a0f57

View file

@ -656,6 +656,7 @@ int legic_read_mem(uint32_t offset, uint32_t len, uint32_t iv, uint8_t *out, uin
clearCommandBuffer(); clearCommandBuffer();
SendCommandNG(CMD_HF_LEGIC_READER, (uint8_t *)payload, sizeof(legic_packet_t)); SendCommandNG(CMD_HF_LEGIC_READER, (uint8_t *)payload, sizeof(legic_packet_t));
free(payload);
PacketResponseNG resp; PacketResponseNG resp;
uint8_t timeout = 0; uint8_t timeout = 0;
@ -669,7 +670,6 @@ int legic_read_mem(uint32_t offset, uint32_t len, uint32_t iv, uint8_t *out, uin
} }
PrintAndLogEx(NORMAL, ""); PrintAndLogEx(NORMAL, "");
*outlen = resp.data.asDwords[0]; *outlen = resp.data.asDwords[0];
if (resp.status != PM3_SUCCESS) { if (resp.status != PM3_SUCCESS) {
PrintAndLogEx(WARNING, "Failed reading tag"); PrintAndLogEx(WARNING, "Failed reading tag");
@ -819,6 +819,7 @@ static int CmdLegicDump(const char *Cmd) {
clearCommandBuffer(); clearCommandBuffer();
SendCommandNG(CMD_HF_LEGIC_READER, (uint8_t *)payload, sizeof(legic_packet_t)); SendCommandNG(CMD_HF_LEGIC_READER, (uint8_t *)payload, sizeof(legic_packet_t));
free(payload);
PacketResponseNG resp; PacketResponseNG resp;
uint8_t timeout = 0; uint8_t timeout = 0;