aboutsummaryrefslogtreecommitdiff
path: root/layers/core_validation.cpp
diff options
context:
space:
mode:
authordavidhubbard <davidhubbard@users.noreply.github.com>2016-07-27 17:59:58 -0700
committerMark Young <marky@lunarg.com>2016-08-01 07:34:29 -0600
commit7bb2dbf3835e66203614fe9fbbe969d21335e8ea (patch)
tree067447fbcfb20c4d031cf584a7d85087e105e932 /layers/core_validation.cpp
parentf475f09613747b4880c3e78552f8bc46793c4f60 (diff)
downloadusermoji-7bb2dbf3835e66203614fe9fbbe969d21335e8ea.tar.xz
loader: gh571 vkEnumerateInstanceLayerProperties()
This fixed a memory leak. Steps to reproduce: Run valgrind --leak_check=full on a this test file: ``` int main() { uint32_t layerCount = 0; vkEnumerateInstanceLayerProperties(&layerCount, nullptr); printf("layerCount=%u\n", layerCount); return 0; } ``` valgrind output will look like: ``` ==PID== ==PID== 49,920 bytes in 6 blocks are definitely lost in loss record 57 of 58 ==PID== at 0x40307C4: malloc (vg_replace_malloc.c:270) ==PID== by 0x4A2B5F3: loader_instance_heap_alloc (loader/loader.c:178) ==PID== by 0x4A2CB0D: loader_init_generic_list (loader/loader.c:858) ==PID== by 0x4A2CBDE: loader_add_to_ext_list (loader/loader.c:889) ==PID== by 0x4A30A32: loader_read_json_layer (loader/loader.c:2311) ==PID== by 0x4A31373: loader_add_layer_properties (loader/loader.c:2509) ==PID== by 0x4A3286F: loader_layer_scan (loader/loader.c:3032) ==PID== by 0x4A38DFC: vkEnumerateInstanceLayerProperties (loader/trampoline.c:239) ==PID== ``` The fix is simple: vkEnumerateInstanceLayerProperties() in loader/trampoline.c should call loader_delete_layer_properties(), not loader_destroy_layer_list() in both places it frees resources associated with the instance_layer_list. Change-Id: I3275195dd27703c2747971288327d546efe5ed25
Diffstat (limited to 'layers/core_validation.cpp')
0 files changed, 0 insertions, 0 deletions