From 04fd3d8f6ad76110c24faf408f3d0665f884bcbc Mon Sep 17 00:00:00 2001 From: Mark Young Date: Mon, 25 Jan 2016 14:43:50 -0700 Subject: SAMPLES: Fixed memory leak in of presentMode data. We were leaking the presentMode array data, now it's freed. --- demos/cube.c | 4 ++++ demos/tri.c | 4 ++++ 2 files changed, 8 insertions(+) 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) -- cgit v1.2.3