Skip to content
Snippets Groups Projects
Commit aed5da45 authored by Eugenio Pérez's avatar Eugenio Pérez Committed by Laurent Vivier
Browse files

vdpa: Fix file descriptor leak on get features error


File descriptor vdpa_device_fd is not free in the case of returning
error from vhost_vdpa_get_features. Fixing it by making all errors go to
the same error path.

Resolves: Coverity CID 1490785
Fixes: 8170ab3f ("vdpa: Extract get features part from vhost_vdpa_get_max_queue_pairs")

Signed-off-by: default avatarEugenio Pérez <eperezma@redhat.com>
Reviewed-by: default avatarLaurent Vivier <lvivier@redhat.com>
Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Message-Id: <20220802112447.249436-2-eperezma@redhat.com>
Signed-off-by: default avatarLaurent Vivier <laurent@vivier.eu>
parent 9567fc16
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment