xfree86: plug memory leak, free driver's private data when deleting the device.
This commit is contained in:
parent
67d7821ae7
commit
880625eef5
|
@ -357,11 +357,11 @@ xf86DeleteInput(InputInfoPtr pInp, int flags)
|
||||||
if (pInp->drv)
|
if (pInp->drv)
|
||||||
pInp->drv->refCount--;
|
pInp->drv->refCount--;
|
||||||
|
|
||||||
/* This should *really* be handled in drv->UnInit(dev) call instead */
|
/* This should *really* be handled in drv->UnInit(dev) call instead, but
|
||||||
#if 0
|
* if the driver forgets about it make sure we free it or at least crash
|
||||||
|
* with flying colors */
|
||||||
if (pInp->private)
|
if (pInp->private)
|
||||||
xfree(pInp->private);
|
xfree(pInp->private);
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Remove the entry from the list. */
|
/* Remove the entry from the list. */
|
||||||
if (pInp == xf86InputDevs)
|
if (pInp == xf86InputDevs)
|
||||||
|
|
Loading…
Reference in New Issue