X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/0e32bf46e70b7feb133f17e99b4c7d4e2590886f..9682ed9aaa4de9a0d9459eb6e51a27a2702b7f83:/client/cmdhfmfu.c?ds=inline diff --git a/client/cmdhfmfu.c b/client/cmdhfmfu.c index 336fd64a..1b438980 100644 --- a/client/cmdhfmfu.c +++ b/client/cmdhfmfu.c @@ -1679,8 +1679,10 @@ int CmdHF14AMfUDump(const char *Cmd){ return 1; } fwrite( dump_file_data, 1, Pages*4 + DUMP_PREFIX_LENGTH, fout ); - fclose(fout); - + if (fout) { + fclose(fout); + fout = NULL; + } PrintAndLog("Dumped %d pages, wrote %d bytes to %s", Pages+(DUMP_PREFIX_LENGTH/4), Pages*4 + DUMP_PREFIX_LENGTH, filename); return 0; }