From: Mohammed Thasleem <mohammed.thasleem@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: petri.latvala@intel.com, kamil.konieczny@intel.com
Subject: [igt-dev] [PATCH i-g-t] lib/igt_kms: Fixed the usage of Dereferencing of null pointer
Date: Wed, 18 Jan 2023 20:27:57 +0530 [thread overview]
Message-ID: <20230118145757.14070-1-mohammed.thasleem@intel.com> (raw)
Fixed the usage of Dereferencing of null pointer to avoid crash.
Signed-off-by: Mohammed Thasleem <mohammed.thasleem@intel.com>
---
lib/igt_kms.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index b4a98ae1..b3334b3a 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -1941,6 +1941,7 @@ kmstest_get_property(int drm_fd, uint32_t object_id, uint32_t object_type,
int i;
proplist = drmModeObjectGetProperties(drm_fd, object_id, object_type);
+ igt_require(proplist);
for (i = 0; i < proplist->count_props; i++) {
_prop = drmModeGetProperty(drm_fd, proplist->props[i]);
if (!_prop)
--
2.25.1
next reply other threads:[~2023-01-18 15:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-18 14:57 Mohammed Thasleem [this message]
2023-01-18 18:46 ` [igt-dev] ✓ Fi.CI.BAT: success for lib/igt_kms: Fixed the usage of Dereferencing of null pointer Patchwork
2023-01-18 19:57 ` [igt-dev] [PATCH i-g-t] " Kamil Konieczny
2023-01-19 17:54 ` [igt-dev] ✓ Fi.CI.IGT: success for " 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=20230118145757.14070-1-mohammed.thasleem@intel.com \
--to=mohammed.thasleem@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=kamil.konieczny@intel.com \
--cc=petri.latvala@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