X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/97d582a69235c88c8f30a88193769dbddb74e9b1..7496d8d822a4a3855e6ab6d1d4cb3fb947517beb:/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)