aboutsummaryrefslogtreecommitdiff
path: root/include/exec
diff options
context:
space:
mode:
authorAlex Chen <alex.chen@huawei.com>2020-11-25 01:30:55 +0000
committerMichael S. Tsirkin <mst@redhat.com>2020-12-08 13:48:57 -0500
commit81ee17aa461d1bf05a45dddd7f9abfa9ab0b2036 (patch)
tree2e4ccb41f2d3e69374ab9c55c8e00158347d4e89 /include/exec
parent553032db17440f8de011390e5a1cfddd13751b0b (diff)
vhost-user-scsi: Fix memleaks in vus_proc_req()
The 'elem' is allocated memory in vu_queue_pop(), and its memory should be freed in all error branches after vu_queue_pop(). In addition, in order to free the 'elem' memory outside of while(1) loop, move the definition of 'elem' to the beginning of vus_proc_req(). Reported-by: Euler Robot <euler.robot@huawei.com> Signed-off-by: Alex Chen <alex.chen@huawei.com> Reviewed-by: Raphael Norwitz <raphael.norwitz@nutanix.com> Message-Id: <20201125013055.34147-1-alex.chen@huawei.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/exec')
0 files changed, 0 insertions, 0 deletions