]> cvs.zerfleddert.de Git - proxmark3-svn/blobdiff - client/nonce2key/crapto1.c
FIXED: Merged all Holimans code-review issues which should fix a lot of memoryleaks.
[proxmark3-svn] / client / nonce2key / crapto1.c
index 90f55ab4c6cce6ad91ad594059069a7e64a0a270..c2dd7a547bfff60365f3b6a36ac87e280aeb4409 100644 (file)
@@ -544,7 +544,12 @@ lfsr_common_prefix(uint32_t pfx, uint32_t rr, uint8_t ks[8], uint8_t par[8][8],
 \r
        statelist = malloc((sizeof *statelist) << 21);  //how large should be? \r
        if(!statelist || !odd || !even)\r
-                return 0;\r
+       {\r
+          free(statelist);\r
+          free(odd);\r
+          free(even);\r
+          return 0;\r
+       }\r
 \r
        s = statelist;\r
        for(o = odd; *o != -1; ++o)\r
Impressum, Datenschutz