diff options
author | 2010-04-16 16:27:12 +0000 | |
---|---|---|
committer | 2010-04-16 16:27:12 +0000 | |
commit | ae28bc8afec60eb2390a47aa43b7cdfd7f0c3a78 (patch) | |
tree | 926a0fea373312b9c9c1d8953b8ce8ae04b8b4ba | |
parent | If we fail to idle the chip in leavvt don't disable the interrupt, (diff) | |
download | wireguard-openbsd-ae28bc8afec60eb2390a47aa43b7cdfd7f0c3a78.tar.xz wireguard-openbsd-ae28bc8afec60eb2390a47aa43b7cdfd7f0c3a78.zip |
paranoia: NULL check before free.
-rw-r--r-- | sys/dev/pci/drm/i915_drv.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/i915_drv.c b/sys/dev/pci/drm/i915_drv.c index fefd718aeb6..3b5454141c5 100644 --- a/sys/dev/pci/drm/i915_drv.c +++ b/sys/dev/pci/drm/i915_drv.c @@ -4133,7 +4133,8 @@ inteldrm_teardown_mchbar(struct drm_i915_private *dev_priv, high = pci_conf_read(bpa->pa_pc, bpa->pa_tag, reg + 4); low = pci_conf_read(bpa->pa_pc, bpa->pa_tag, reg); mchbar_addr = ((u_int64_t)high << 32) | low; - extent_free(bpa->pa_memex, mchbar_addr, MCHBAR_SIZE, 0); + if (bpa->pa_memex) + extent_free(bpa->pa_memex, mchbar_addr, MCHBAR_SIZE, 0); /* FALLTHROUGH */ case 1: if (IS_I915G(dev_priv) || IS_I915GM(dev_priv)) { |