]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - crypto/drbg.c
UBUNTU: snapcraft.yaml: various improvements
[mirror_ubuntu-artful-kernel.git] / crypto / drbg.c
index cdb27ac4b2266eccff2ba89a5388ec2fbf6d18bc..70018397e59abf10d125864f5770c41cd13f2021 100644 (file)
@@ -1133,10 +1133,10 @@ static inline void drbg_dealloc_state(struct drbg_state *drbg)
 {
        if (!drbg)
                return;
-       kzfree(drbg->V);
-       drbg->Vbuf = NULL;
-       kzfree(drbg->C);
-       drbg->Cbuf = NULL;
+       kzfree(drbg->Vbuf);
+       drbg->V = NULL;
+       kzfree(drbg->Cbuf);
+       drbg->C = NULL;
        kzfree(drbg->scratchpadbuf);
        drbg->scratchpadbuf = NULL;
        drbg->reseed_ctr = 0;
@@ -1691,6 +1691,7 @@ static int drbg_init_sym_kernel(struct drbg_state *drbg)
                return PTR_ERR(sk_tfm);
        }
        drbg->ctr_handle = sk_tfm;
+       init_completion(&drbg->ctr_completion);
 
        req = skcipher_request_alloc(sk_tfm, GFP_KERNEL);
        if (!req) {