summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2019-07-17 07:54:19 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2019-07-17 07:54:19 +0000
commitef536df52e0e823c0e3d7598a9f2edcf752e43e1 (patch)
tree26eb5987b2c41d9616b9cce37a78c2389a624699 /sys/dev
parentb0fbf84b4b14aca5456de8ec175f740b26aa6ad4 (diff)
don't free dev_priv (softc) in i915_driver_load() error path
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/drm/i915/i915_drv.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/dev/pci/drm/i915/i915_drv.c b/sys/dev/pci/drm/i915/i915_drv.c
index c3fbdf5ce79..f0cdd46a147 100644
--- a/sys/dev/pci/drm/i915/i915_drv.c
+++ b/sys/dev/pci/drm/i915/i915_drv.c
@@ -1644,7 +1644,9 @@ out_fini:
drm_dev_fini(&dev_priv->drm);
out_free:
#endif
+#ifdef __linux__
kfree(dev_priv);
+#endif
pci_set_drvdata(pdev, NULL);
return ret;
}