cryptodev(4): Fix a bug where the wrong key was bzero()'d before kfree().
authorSascha Wildner <saw@online.de>
Tue, 6 Dec 2011 09:33:29 +0000 (10:33 +0100)
committerSascha Wildner <saw@online.de>
Tue, 6 Dec 2011 09:33:29 +0000 (10:33 +0100)
sys/opencrypto/cryptodev.c

index f49ad42..852ef36 100644 (file)
@@ -326,7 +326,7 @@ bail:
                                kfree(crie.cri_key, M_XDATA);
                        }
                        if (cria.cri_key) {
-                               bzero(crie.cri_key, crie.cri_klen / 8);
+                               bzero(cria.cri_key, cria.cri_klen / 8);
                                kfree(cria.cri_key, M_XDATA);
                        }
                }