]> cvs.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmdhfmf.c
FIX: Coverity, Identical code for different branches, CID #121315, added a messa...
[proxmark3-svn] / client / cmdhfmf.c
index b2d5494fb0226e6cdef814fb36f8a3ac5af7c03d..7736b9c51acbfd370a95b799a00d57e753cb47f9 100644 (file)
@@ -2027,7 +2027,10 @@ int CmdHF14AMfSniff(const char *Cmd){
                        uint16_t traceLen = resp.arg[1];\r
                        len = resp.arg[2];\r
 \r
                        uint16_t traceLen = resp.arg[1];\r
                        len = resp.arg[2];\r
 \r
-                       if (res == 0) return 0;                                         // we are done\r
+                       if (res == 0) {\r
+                               free(buf);\r
+                               return 0;                                               // we are done\r
+                       }\r
 \r
                        if (res == 1) {                                                         // there is (more) data to be transferred\r
                                if (pckNum == 0) {                                              // first packet, (re)allocate necessary buffer\r
 \r
                        if (res == 1) {                                                         // there is (more) data to be transferred\r
                                if (pckNum == 0) {                                              // first packet, (re)allocate necessary buffer\r
@@ -2160,7 +2163,8 @@ static command_t CommandTable[] =
 int CmdHFMF(const char *Cmd)\r
 {\r
        // flush\r
 int CmdHFMF(const char *Cmd)\r
 {\r
        // flush\r
-       WaitForResponseTimeout(CMD_ACK,NULL,100);\r
+       clearCommandBuffer();\r
+       //WaitForResponseTimeout(CMD_ACK,NULL,100);\r
        CmdsParse(CommandTable, Cmd);\r
        return 0;\r
 }\r
        CmdsParse(CommandTable, Cmd);\r
        return 0;\r
 }\r
Impressum, Datenschutz