d3d12: Fix memory leak if create_root_signature failed.
authorVinson Lee <vlee@freedesktop.org>
Fri, 18 Dec 2020 22:36:54 +0000 (14:36 -0800)
committerMarge Bot <eric+marge@anholt.net>
Sun, 20 Dec 2020 23:33:20 +0000 (23:33 +0000)
commit3df7c9bf54c7eebc11b2d67667cf6538a662124d
tree8da25e57f98839e9b3411fa994667329eed01739
parent1ff5463ff83c0a5f6ea6be56056852318bc12d8c
d3d12: Fix memory leak if create_root_signature failed.

Fix defect reported by Coverity Scan.

Resource leak (RESOURCE_LEAK)
leaked_storage: Variable data going out of scope leaks the storage it points to.

Fixes: 2ea15cd661c ("d3d12: introduce d3d12 gallium driver")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Erik Faye-Lund <kusmabite@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8170>
src/gallium/drivers/d3d12/d3d12_root_signature.cpp