⬢ DragonFlyBSD Kernel Audit
DF-2404 / fix.diff
← back to finding ↓ download raw
# DF-2404 fix (authored post-verification; not applied to sys/)
--- a/sys/dev/crypto/rdrand/rdrand.c
+++ b/sys/dev/crypto/rdrand/rdrand.c
@@ -149,6 +149,8 @@ rdrand_detach(device_t dev)
 	for (i = 0; i < ncpus; ++i) {
 		callout_terminate(&sc->sc_rng_co[i]);
 	}
+	kfree(sc->sc_rng_co, M_TEMP);
+	sc->sc_rng_co = NULL;
 
 	return (0);