projects
/
platform
/
upstream
/
Vulkan-LoaderAndValidationLayers.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4d9b5f5
)
SAMPLES: Fixed memory leak in of presentMode data.
author
Mark Young
<marky@lunarg.com>
Mon, 25 Jan 2016 21:43:50 +0000
(14:43 -0700)
committer
Mark Young
<marky@lunarg.com>
Mon, 25 Jan 2016 23:04:01 +0000
(16:04 -0700)
We were leaking the presentMode array data, now it's freed.
demos/cube.c
patch
|
blob
|
history
demos/tri.c
patch
|
blob
|
history
diff --git
a/demos/cube.c
b/demos/cube.c
index
18bf12e
..
4747371
100644
(file)
--- a/
demos/cube.c
+++ b/
demos/cube.c
@@
-927,6
+927,10
@@
static void demo_prepare_buffers(struct demo *demo)
&color_image_view, NULL, &demo->buffers[i].view);
assert(!err);
}
+
+ if (NULL != presentModes) {
+ free(presentModes);
+ }
}
static void demo_prepare_depth(struct demo *demo)
diff --git
a/demos/tri.c
b/demos/tri.c
index
b0663b4
..
6b17eb3
100644
(file)
--- a/
demos/tri.c
+++ b/
demos/tri.c
@@
-718,6
+718,10
@@
static void demo_prepare_buffers(struct demo *demo)
}
demo->current_buffer = 0;
+
+ if (NULL != presentModes) {
+ free(presentModes);
+ }
}
static void demo_prepare_depth(struct demo *demo)