diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2016-08-03 06:18:51 +0200 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2016-08-09 12:42:35 +0200 |
commit | 3cc36f6e34bd2d92d23be7b598ba5e639c47b01a (patch) | |
tree | 8fcb616fee42ce6fb470e8fbe0d03c6baf361894 /drivers/virtio | |
parent | virtio: fix memory leak in virtqueue_add() (diff) | |
download | linux-3cc36f6e34bd2d92d23be7b598ba5e639c47b01a.tar.xz linux-3cc36f6e34bd2d92d23be7b598ba5e639c47b01a.zip |
virtio: fix error handling for debug builds
On error, virtqueue_add calls START_USE but not
END_USE. Thankfully that's normally empty anyway,
but might not be when debugging. Fix it up.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/virtio')
-rw-r--r-- | drivers/virtio/virtio_ring.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index 5ed228ddadba..e383ecdaca59 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_ring.c @@ -428,6 +428,7 @@ unmap_release: if (indirect) kfree(desc); + END_USE(vq); return -EIO; } |