X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=crypto%2Ftcrypt.c;h=e47f6e02133c155622d477567d88f890489f151f;hb=7dc9719682ce8c46215bc9a1bdc7ee0c38ada94b;hp=6beabc5abd0747b0c2749d1d0c045c53e87e9856;hpb=19b5b517a8b81a448be9b2bdaf18a761a7b9799e;p=pandora-kernel.git diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c index 6beabc5abd07..e47f6e02133c 100644 --- a/crypto/tcrypt.c +++ b/crypto/tcrypt.c @@ -586,12 +586,6 @@ static void test_cipher(char *algo, int enc, j = 0; for (i = 0; i < tcount; i++) { - data = kzalloc(template[i].ilen, GFP_KERNEL); - if (!data) - continue; - - memcpy(data, template[i].input, template[i].ilen); - if (template[i].iv) memcpy(iv, template[i].iv, MAX_IVLEN); else @@ -613,10 +607,8 @@ static void test_cipher(char *algo, int enc, printk("setkey() failed flags=%x\n", crypto_ablkcipher_get_flags(tfm)); - if (!template[i].fail) { - kfree(data); + if (!template[i].fail) goto out; - } } temp = 0;