diff options
| author | Peter Hutterer <peter.hutterer@who-t.net> | 2008-07-22 14:34:28 +0930 |
|---|---|---|
| committer | Peter Hutterer <peter.hutterer@who-t.net> | 2008-07-22 15:54:49 +0930 |
| commit | 880625eef5d8b168df3e42836fa1b763c51a91b5 (patch) | |
| tree | b97bc0d8db712d7272915744177d58d3c4717da6 | |
| parent | 67d7821ae783d3f123b6ba7203abf847374a1e36 (diff) | |
xfree86: plug memory leak, free driver's private data when deleting the device.
| -rw-r--r-- | hw/xfree86/common/xf86Helper.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c index 41181b066..fedd7a3f7 100644 --- a/hw/xfree86/common/xf86Helper.c +++ b/hw/xfree86/common/xf86Helper.c @@ -357,11 +357,11 @@ xf86DeleteInput(InputInfoPtr pInp, int flags) if (pInp->drv) pInp->drv->refCount--; - /* This should *really* be handled in drv->UnInit(dev) call instead */ -#if 0 + /* This should *really* be handled in drv->UnInit(dev) call instead, but + * if the driver forgets about it make sure we free it or at least crash + * with flying colors */ if (pInp->private) xfree(pInp->private); -#endif /* Remove the entry from the list. */ if (pInp == xf86InputDevs) |
