projects
/
platform
/
upstream
/
Vulkan-Tools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4c6673b
)
Fix memory leak in `vkcube`.
author
Jason Chen
<shchenchang@gmail.com>
Thu, 4 Apr 2019 04:45:29 +0000
(12:45 +0800)
committer
jeremyk-lunarg
<jeremyk@lunarg.com>
Thu, 2 May 2019 16:25:10 +0000
(10:25 -0600)
cube/cube.c
patch
|
blob
|
history
diff --git
a/cube/cube.c
b/cube/cube.c
index
e4d59fa
..
ff4d5a6
100644
(file)
--- a/
cube/cube.c
+++ b/
cube/cube.c
@@
-1381,6
+1381,10
@@
static void demo_prepare_buffers(struct demo *demo) {
demo->next_present_id = 1;
}
+ if (NULL != swapchainImages) {
+ free(swapchainImages);
+ }
+
if (NULL != presentModes) {
free(presentModes);
}
@@
-3473,6
+3477,7
@@
static void demo_init_vk_swapchain(struct demo *demo) {
demo->format = surfFormats[0].format;
}
demo->color_space = surfFormats[0].colorSpace;
+ free(surfFormats);
demo->quit = false;
demo->curFrame = 0;