diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2024-08-13 00:58:48 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2024-08-13 00:58:48 +0000 |
commit | cf947a7dcbb0e4c6018a391ecb994a9ad7ad3b97 (patch) | |
tree | e0bc5507bca1bd8aa0d294ccc26f2cb9d239c7d9 /sys | |
parent | 5d77e7e490c03dcf3ab687a681698b04cfe4ffc7 (diff) |
drm/i915: Prevent potential null-ptr-deref in engine_init_common
From Nirmoy Das
f1cdb599ce0ef909343d6c8e7d372defbaa382b9 in mainline linux
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/drm/i915/gt/intel_engine_cs.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/i915/gt/intel_engine_cs.c b/sys/dev/pci/drm/i915/gt/intel_engine_cs.c index eacfe846112..6b9c9c0bfa5 100644 --- a/sys/dev/pci/drm/i915/gt/intel_engine_cs.c +++ b/sys/dev/pci/drm/i915/gt/intel_engine_cs.c @@ -1523,7 +1523,8 @@ static int engine_init_common(struct intel_engine_cs *engine) return 0; err_bce_context: - intel_engine_destroy_pinned_context(bce); + if (bce) + intel_engine_destroy_pinned_context(bce); err_ce_context: intel_engine_destroy_pinned_context(ce); return ret; |