]> cvs.zerfleddert.de Git - proxmark3-svn/blobdiff - armsrc/crapto1.c
ADD: added @pivi 's faster authentication method from 'hardnested' into "hf mf...
[proxmark3-svn] / armsrc / crapto1.c
index a6b6da4dbbfa31ccb4088099740da34b7118af2b..fcfd0b4da996ee9d2bc9cd98a4b828d223182e82 100644 (file)
@@ -520,9 +520,8 @@ struct Crypto1State* lfsr_common_prefix(uint32_t pfx, uint32_t rr, uint8_t ks[8]
        s = statelist = malloc((sizeof *statelist) << 21);\r
        if(!s || !odd || !even) {\r
                free(statelist);\r
-               free(odd);\r
-               free(even);\r
-               return 0;\r
+               statelist = 0;\r
+               goto out;\r
        }\r
 \r
        for(o = odd; *o + 1; ++o)\r
@@ -534,7 +533,7 @@ struct Crypto1State* lfsr_common_prefix(uint32_t pfx, uint32_t rr, uint8_t ks[8]
                        }\r
 \r
        s->odd = s->even = 0;\r
-\r
+out:\r
        free(odd);\r
        free(even);\r
        return statelist;\r
Impressum, Datenschutz