Page MenuHomeFreeBSD

D61050.1793514105.diff
No OneTemporary

Authored By
Unknown
Size
535 B
Referenced Files
None
Subscribers
None

D61050.1793514105.diff

diff --git a/sys/dev/virtio/random/virtio_random.c b/sys/dev/virtio/random/virtio_random.c
--- a/sys/dev/virtio/random/virtio_random.c
+++ b/sys/dev/virtio/random/virtio_random.c
@@ -184,8 +184,15 @@
vtrnd_enqueue(sc);
fail:
- if (error)
- vtrnd_detach(dev);
+ if (error != 0) {
+ /* Parent will free the virtqueue. */
+ if (g_vtrnd_softc == sc) {
+ atomic_store_explicit(&g_vtrnd_softc, NULL,
+ memory_order_release);
+ }
+ sglist_free(sc->vtrnd_sg);
+ zfree(sc->vtrnd_value, M_DEVBUF);
+ }
return (error);
}

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 1, 6:21 AM (8 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41266874
Default Alt Text
D61050.1793514105.diff (535 B)

Event Timeline