X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=inline;f=net%2Fipv4%2Fesp4.c;h=1b5a09d1b90b77ca26b03210e974746f7b316218;hb=f35279d3f713e5c97b98cbdbf47d98f79942c11f;hp=b31ffc5053d2efd36c5e4e149c644d1e6c9f1235;hpb=a8e4f435d9ea38bfe9171d7458b2057d440825b1;p=linux-2.6 diff --git a/net/ipv4/esp4.c b/net/ipv4/esp4.c index b31ffc5053..1b5a09d1b9 100644 --- a/net/ipv4/esp4.c +++ b/net/ipv4/esp4.c @@ -343,22 +343,14 @@ static void esp_destroy(struct xfrm_state *x) if (!esp) return; - if (esp->conf.tfm) { - crypto_free_tfm(esp->conf.tfm); - esp->conf.tfm = NULL; - } - if (esp->conf.ivec) { - kfree(esp->conf.ivec); - esp->conf.ivec = NULL; - } - if (esp->auth.tfm) { - crypto_free_tfm(esp->auth.tfm); - esp->auth.tfm = NULL; - } - if (esp->auth.work_icv) { - kfree(esp->auth.work_icv); - esp->auth.work_icv = NULL; - } + crypto_free_tfm(esp->conf.tfm); + esp->conf.tfm = NULL; + kfree(esp->conf.ivec); + esp->conf.ivec = NULL; + crypto_free_tfm(esp->auth.tfm); + esp->auth.tfm = NULL; + kfree(esp->auth.work_icv); + esp->auth.work_icv = NULL; kfree(esp); }