@@ -238,12 +238,11 @@ static void *mppe_alloc(unsigned char *options, int optlen)
return (void *)state;
out_free:
- if (state->sha1_digest)
kfree(state->sha1_digest);
if (state->sha1)
- crypto_free_hash(state->sha1);
+ crypto_free_hash(state->sha1);
if (state->arc4)
- crypto_free_blkcipher(state->arc4);
+ crypto_free_blkcipher(state->arc4);
kfree(state);
out:
return NULL;
@@ -256,12 +255,11 @@ static void mppe_free(void *arg)
{
struct ppp_mppe_state *state = (struct ppp_mppe_state *) arg;
if (state) {
- if (state->sha1_digest)
kfree(state->sha1_digest);
if (state->sha1)
- crypto_free_hash(state->sha1);
+ crypto_free_hash(state->sha1);
if (state->arc4)
- crypto_free_blkcipher(state->arc4);
+ crypto_free_blkcipher(state->arc4);
kfree(state);
}
}