X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/4c6f2d48fbe8d57c6fbd80b7e4b38acaf6355e47..e888ed8e62bab6d7421c9b9689309a58040754fe:/client/mifarehost.c?ds=sidebyside diff --git a/client/mifarehost.c b/client/mifarehost.c index 72e70662..2a1f8a48 100644 --- a/client/mifarehost.c +++ b/client/mifarehost.c @@ -350,13 +350,15 @@ int loadTraceCard(uint8_t *tuid) { while(!feof(f)){ memset(buf, 0, sizeof(buf)); if (fgets(buf, sizeof(buf), f) == NULL) { - PrintAndLog("File reading error."); + PrintAndLog("File reading error."); + fclose(f); return 2; - } + } if (strlen(buf) < 32){ if (feof(f)) break; PrintAndLog("File content error. Block data must include 32 HEX symbols"); + fclose(f); return 2; } for (i = 0; i < 32; i += 2)