i830: Fix timer leak

TimerCancel just cancels the timer: it still leaves the TimerRec intact and
unfreed.
This commit is contained in:
Daniel Stone 2008-09-05 05:02:08 +03:00
parent fca7a4e9a5
commit b9ef0ed7d7
1 changed files with 3 additions and 3 deletions

View File

@ -3528,7 +3528,7 @@ I830LeaveVT(int scrnIndex, int flags)
pI830->leaving = TRUE;
if (pI830->devicesTimer)
TimerCancel(pI830->devicesTimer);
TimerFree(pI830->devicesTimer);
pI830->devicesTimer = NULL;
i830SetHotkeyControl(pScrn, HOTKEY_BIOS_SWITCH);
@ -3787,7 +3787,7 @@ I830CloseScreen(int scrnIndex, ScreenPtr pScreen)
}
if (pI830->devicesTimer)
TimerCancel(pI830->devicesTimer);
TimerFree(pI830->devicesTimer);
pI830->devicesTimer = NULL;
if (!pI830->use_drm_mode) {
@ -3936,7 +3936,7 @@ I830PMEvent(int scrnIndex, pmEvent event, Bool undo)
/* If we had status checking turned on, turn it off now */
if (pI830->checkDevices) {
if (pI830->devicesTimer)
TimerCancel(pI830->devicesTimer);
TimerFree(pI830->devicesTimer);
pI830->devicesTimer = NULL;
pI830->checkDevices = FALSE;
}