public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Pranay Samala <pranay.samala@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: karthik.b.s@intel.com, sameer.lattannavar@intel.com,
	pranay.samala@intel.com
Subject: [PATCH i-g-t] Avoid crash from uninitialized pipe_crc pointer
Date: Tue,  6 Jan 2026 14:19:06 +0530	[thread overview]
Message-ID: <20260106084906.31185-1-pranay.samala@intel.com> (raw)

The data_t structure was not initialized, leaving pipe_crc with an
undefined value on first use and could result in freeing an invalid
pointer.
Initialize data_t to zero so pipe_crc starts as NULL and the
cleanup path safely manages the CRC object.

Signed-off-by: Pranay Samala <pranay.samala@intel.com>
---
 tests/intel/kms_fb_coherency.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/intel/kms_fb_coherency.c b/tests/intel/kms_fb_coherency.c
index 59bc29d19..ca915bc16 100644
--- a/tests/intel/kms_fb_coherency.c
+++ b/tests/intel/kms_fb_coherency.c
@@ -238,7 +238,7 @@ static void select_valid_pipe_output_combo(data_t *data)
 
 int igt_main()
 {
-	data_t data;
+	data_t data = { 0 };
 
 	igt_fixture() {
 		data.drm_fd = drm_open_driver_master(DRIVER_INTEL | DRIVER_XE);
-- 
2.34.1


             reply	other threads:[~2026-01-06  8:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-06  8:49 Pranay Samala [this message]
2026-01-06  9:07 ` [PATCH i-g-t] Avoid crash from uninitialized pipe_crc pointer Reddy Guddati, Santhosh
2026-01-08 15:42   ` Kamil Konieczny
2026-01-06 11:24 ` ✓ Xe.CI.BAT: success for " Patchwork
2026-01-06 11:35 ` ✓ i915.CI.BAT: " Patchwork
2026-01-06 14:57 ` ✓ Xe.CI.Full: " Patchwork
2026-01-06 17:46 ` ✗ i915.CI.Full: failure " 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=20260106084906.31185-1-pranay.samala@intel.com \
    --to=pranay.samala@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=karthik.b.s@intel.com \
    --cc=sameer.lattannavar@intel.com \
    /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