Skip to content

virtio-rng: Fix memory leaks in virtio_rng_device_realize

John Snow qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2virtio-rng: Move error-checking forward to prevent memory leakhw/virtio/virtio-rng.c+10 -100 replies
2/2virtio-rng: replace error_set calls with error_setghw/virtio/virtio-rng.c+4 -50 replies

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchMarkus ArmbrusterStefan Hajnoczi
SeriesR-b R-b
1/2
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [Qemu-devel] [PATCH 0/2] virtio-rng: Fix memory leaks in virtio_rng_device_realize

My previous commit, 713e8a10, did not address the fact that the error checking pathways do not attempt to call virtio_cleanup and thus can leak memory in hotplug scenarios.

This patchset shuffles around the error checking so it does not need to perform said cleanup, and changes the error functions from error_set to error_setg.

John Snow (2):
virtio-rng: Move error-checking forward to prevent memory leak
virtio-rng: replace error_set calls with error_setg

 hw/virtio/virtio-rng.c | 25 ++++++++++++-------------
 1 file changed, 12 insertions(+), 13 deletions(-)
Signature · 1 line
1.9.3