From: Mika Kahola <mika.kahola@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t v3 2/2] tests/kms_concurrent: Plug possible memory leaks
Date: Thu, 26 Mar 2020 15:53:22 +0200 [thread overview]
Message-ID: <20200326135322.9958-3-mika.kahola@intel.com> (raw)
In-Reply-To: <20200326135322.9958-1-mika.kahola@intel.com>
Free dynamically allocated memory that has a potential
to leak memory.
Signed-off-by: Mika Kahola <mika.kahola@intel.com>
---
tests/kms_concurrent.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/tests/kms_concurrent.c b/tests/kms_concurrent.c
index 1a7c12fc..1403e990 100644
--- a/tests/kms_concurrent.c
+++ b/tests/kms_concurrent.c
@@ -193,6 +193,10 @@ prepare_planes(data_t *data, enum pipe pipe, int max_planes,
max_planes, output);
igt_plane_set_fb(data->plane[primary->index], &data->fb[primary->index]);
+
+ free(x);
+ free(y);
+ free(size);
}
static int test_bandwidth(data_t *data, enum pipe pipe, igt_output_t *output)
@@ -228,6 +232,10 @@ test_plane_position_with_output(data_t *data, enum pipe pipe, int max_planes,
while (i < iterations || loop_forever) {
prepare_planes(data, pipe, max_planes, output);
igt_display_commit2(&data->display, COMMIT_ATOMIC);
+
+ for (int c = 0; c < max_planes; c++)
+ igt_remove_fb(data->drm_fd, &data->fb[c]);
+
i++;
}
}
--
2.20.1
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2020-03-26 13:53 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-26 13:53 [igt-dev] [PATCH i-g-t v3 0/2] tests/kms_concurrent: Test maximum number of planes supported by the platform Mika Kahola
2020-03-26 13:53 ` [igt-dev] [PATCH i-g-t v3 1/2] " Mika Kahola
2020-03-27 8:05 ` Lisovskiy, Stanislav
2020-03-26 13:53 ` Mika Kahola [this message]
2020-03-27 8:01 ` [igt-dev] [PATCH i-g-t v3 2/2] tests/kms_concurrent: Plug possible memory leaks Lisovskiy, Stanislav
2020-03-27 10:05 ` Kahola, Mika
2020-03-26 14:40 ` [igt-dev] [PATCH i-g-t v3 0/2] tests/kms_concurrent: Test maximum number of planes supported by the platform Juha-Pekka Heikkila
2020-03-26 17:09 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_concurrent: Test maximum number of planes supported by the platform (rev3) Patchwork
2020-03-27 10:05 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2020-03-27 10:24 ` Petri Latvala
2020-03-27 11:45 ` Kahola, Mika
2020-03-27 12:34 ` Petri Latvala
2020-03-27 12:35 ` Kahola, Mika
2020-03-27 12:36 ` Kahola, Mika
2020-03-27 13:17 ` Kahola, Mika
2020-03-27 12:07 ` [igt-dev] ✗ Fi.CI.BUILD: failure for tests/kms_concurrent: Test maximum number of planes supported by the platform (rev4) Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200326135322.9958-3-mika.kahola@intel.com \
--to=mika.kahola@intel.com \
--cc=igt-dev@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox