diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2017-12-08 15:02:03 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2017-12-08 15:02:03 +0000 |
commit | e2e6e25be1cbd7ecc45bbd9130c4527f7715e547 (patch) | |
tree | 85e40fcfbc819cb0394346c69db478a22e9ed122 /xserver/hw/xfree86/i2c/xf86i2c.c | |
parent | 63d0911c1d9f1be4f8755144bced468fcbc398a6 (diff) |
Update to xserver 1.19.5.
Tested by bru@, jsg@ and others
Diffstat (limited to 'xserver/hw/xfree86/i2c/xf86i2c.c')
-rw-r--r-- | xserver/hw/xfree86/i2c/xf86i2c.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/xserver/hw/xfree86/i2c/xf86i2c.c b/xserver/hw/xfree86/i2c/xf86i2c.c index 2a8b8df22..22109cfbc 100644 --- a/xserver/hw/xfree86/i2c/xf86i2c.c +++ b/xserver/hw/xfree86/i2c/xf86i2c.c @@ -614,7 +614,7 @@ xf86CreateI2CDevRec(void) void xf86DestroyI2CDevRec(I2CDevPtr d, Bool unalloc) { - if (d) { + if (d && d->pI2CBus) { I2CDevPtr *p; /* Remove this from the list of active I2C devices. */ @@ -628,10 +628,10 @@ xf86DestroyI2CDevRec(I2CDevPtr d, Bool unalloc) xf86DrvMsg(d->pI2CBus->scrnIndex, X_INFO, "I2C device \"%s:%s\" removed.\n", d->pI2CBus->BusName, d->DevName); - - if (unalloc) - free(d); } + + if (unalloc) + free(d); } /* I2C transmissions are related to an I2CDevRec you must link to a |