namespace-pollution: Fix memory leak on error path.
commit5692dbacfb1af9e4c5e71d44e1868c5fcf196a38
authorVinson Lee <vlee@freedesktop.org>
Mon, 21 Feb 2022 07:10:13 +0000 (20 23:10 -0800)
committerVinson Lee <vlee@freedesktop.org>
Tue, 1 Mar 2022 08:10:38 +0000 (1 00:10 -0800)
treeb97e19849f391de64492841448f99b383e278089
parent2489c5da135eb87f05a28622e2d84a5647bc1d55
namespace-pollution: Fix memory leak on error path.

Fix defect reported by Coverity Scan.

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

Fixes: 5f954c14e ("namespace-pollution: Add vertex program as an object to test")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/637>
tests/general/object-namespace-pollution.c