aboutsummaryrefslogtreecommitdiff
path: root/lib/test_fortify/write_overflow-memcpy.c
diff options
context:
space:
mode:
authorMaximilian Heyne <[email protected]>2023-09-11 09:03:29 +0000
committerMichael S. Tsirkin <[email protected]>2023-10-18 11:29:09 -0400
commitfab7f259227b8f70aa6d54e1de1a1f5f4729041c (patch)
treeb3cbe73151ec3f9d6193b64680887d0a13e03bab /lib/test_fortify/write_overflow-memcpy.c
parentd121df789b159e9a8ee770666f210975a81e8111 (diff)
virtio-mmio: fix memory leak of vm_dev
With the recent removal of vm_dev from devres its memory is only freed via the callback virtio_mmio_release_dev. However, this only takes effect after device_add is called by register_virtio_device. Until then it's an unmanaged resource and must be explicitly freed on error exit. This bug was discovered and resolved using Coverity Static Analysis Security Testing (SAST) by Synopsys, Inc. Cc: [email protected] Fixes: 55c91fedd03d ("virtio-mmio: don't break lifecycle of vm_dev") Signed-off-by: Maximilian Heyne <[email protected]> Reviewed-by: Catalin Marinas <[email protected]> Tested-by: Catalin Marinas <[email protected]> Reviewed-by: Xuan Zhuo <[email protected]> Message-Id: <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]> Reviewed-by: Wolfram Sang <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-memcpy.c')
0 files changed, 0 insertions, 0 deletions