X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/0ce5620254d53745397f06b349f7c4d35c1f41d8..ca4714cd23338a762c45839d1b3010988b7612a7:/client/mifarehost.c 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)