X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/b1231445c7e56f11d77c81c2e027e5fb85631ca0..55eaed8f2ad26b9db249e2259c13444c38906795:/client/nonce2key/crapto1.c

diff --git a/client/nonce2key/crapto1.c b/client/nonce2key/crapto1.c
index 90f55ab4..6c0fcafa 100644
--- a/client/nonce2key/crapto1.c
+++ b/client/nonce2key/crapto1.c
@@ -544,7 +544,12 @@ lfsr_common_prefix(uint32_t pfx, uint32_t rr, uint8_t ks[8], uint8_t par[8][8],
 
 	statelist = malloc((sizeof *statelist) << 21);	//how large should be? 
 	if(!statelist || !odd || !even)
+	{
+				free(statelist);
+				free(odd);
+				free(even);
                 return 0;
+	}
 
 	s = statelist;
 	for(o = odd; *o != -1; ++o)