Skip to content

Commit

Permalink
xfree86: plug memory leak, free driver's private data when deleting t…
Browse files Browse the repository at this point in the history
…he device.
  • Loading branch information
whot committed Jul 22, 2008
1 parent 67d7821 commit 880625e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions hw/xfree86/common/xf86Helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 880625e

Please sign in to comment.