Free in case of write error
This commit is contained in:
1 parent
4bf3cb928b
commit
f6ae161fd5
1 file changed
+2
-1
@@ -1923,7 +1923,8 @@ static int CmdHF14BRestore(const char *Cmd) {
|
||||
|
||||
int status = write_sr_block(blockno, 4, data+blockno*4);
|
||||
if (status != PM3_SUCCESS) {
|
||||
PrintAndLogEx(FAILED, "Write failed shutting down");
|
||||
PrintAndLogEx(FAILED, "Write failed");
|
||||
free(data);
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user