public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] lib/igt_kms: Fixed the usage of Dereferencing of null pointer
@ 2023-01-18 14:57 Mohammed Thasleem
  2023-01-18 18:46 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Mohammed Thasleem @ 2023-01-18 14:57 UTC (permalink / raw)
  To: igt-dev; +Cc: petri.latvala, kamil.konieczny

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-01-19 17:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-18 14:57 [igt-dev] [PATCH i-g-t] lib/igt_kms: Fixed the usage of Dereferencing of null pointer Mohammed Thasleem
2023-01-18 18:46 ` [igt-dev] ✓ Fi.CI.BAT: success for " 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox