util: Fix memory leaks in unit test.
authorVinson Lee <vlee@freedesktop.org>
Sun, 9 Aug 2020 04:26:12 +0000 (21:26 -0700)
committerVinson Lee <vlee@freedesktop.org>
Tue, 11 Aug 2020 21:11:01 +0000 (14:11 -0700)
commit96cfc684e63238a7aeabc8893fb04fe5f3781a66
tree0ada2fb6eb91668c79555e2cb68b71af57b3c5dc
parentef66e02a408c4b8d11a3b7122b0e8e05ffac8eb8
util: Fix memory leaks in unit test.

Fix warnings reported by Coverity Scan.

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

Fixes: d0d14f3f6481 ("util: Add unit test for stack backtrace caputure")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6246>
src/util/u_debug_stack_test.cpp