aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Young <marky@lunarg.com>2016-01-25 14:43:50 -0700
committerMark Young <marky@lunarg.com>2016-01-25 16:04:01 -0700
commit04fd3d8f6ad76110c24faf408f3d0665f884bcbc (patch)
treede68a5f111299caf1572b6f8f3e8cf9d88c3c4d0
parente6d3369047720ac44ccba0c28293abc972c87a86 (diff)
downloadusermoji-04fd3d8f6ad76110c24faf408f3d0665f884bcbc.tar.xz
SAMPLES: Fixed memory leak in of presentMode data.
We were leaking the presentMode array data, now it's freed.
-rw-r--r--demos/cube.c4
-rw-r--r--demos/tri.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/demos/cube.c b/demos/cube.c
index 18bf12ec..47473717 100644
--- 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 b0663b46..6b17eb34 100644
--- 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)