]> err.no Git - linux-2.6/blobdiff - net/ipv4/ah4.c
[IPV6]: Don't redo xfrm_lookup for cached dst entries
[linux-2.6] / net / ipv4 / ah4.c
index 0e98f2235b6e1edc5f35504e23e76ab5bad27aed..035ad2c9e1bad3cdc9fd1382004bfcca2da966eb 100644 (file)
@@ -200,7 +200,7 @@ static void ah4_err(struct sk_buff *skb, u32 info)
        xfrm_state_put(x);
 }
 
-static int ah_init_state(struct xfrm_state *x, void *args)
+static int ah_init_state(struct xfrm_state *x)
 {
        struct ah_data *ahp = NULL;
        struct xfrm_algo_desc *aalg_desc;
@@ -263,10 +263,8 @@ static int ah_init_state(struct xfrm_state *x, void *args)
 
 error:
        if (ahp) {
-               if (ahp->work_icv)
-                       kfree(ahp->work_icv);
-               if (ahp->tfm)
-                       crypto_free_tfm(ahp->tfm);
+               kfree(ahp->work_icv);
+               crypto_free_tfm(ahp->tfm);
                kfree(ahp);
        }
        return -EINVAL;
@@ -279,14 +277,10 @@ static void ah_destroy(struct xfrm_state *x)
        if (!ahp)
                return;
 
-       if (ahp->work_icv) {
-               kfree(ahp->work_icv);
-               ahp->work_icv = NULL;
-       }
-       if (ahp->tfm) {
-               crypto_free_tfm(ahp->tfm);
-               ahp->tfm = NULL;
-       }
+       kfree(ahp->work_icv);
+       ahp->work_icv = NULL;
+       crypto_free_tfm(ahp->tfm);
+       ahp->tfm = NULL;
        kfree(ahp);
 }