Fix memory leak in karm idle detector

This resolves Bug 1438
pull/21/head
Slávek Banko 12 years ago
parent c9a29849cb
commit c4b86c6c43

@ -19,6 +19,7 @@ IdleTimeDetector::IdleTimeDetector(int maxIdle)
if(XScreenSaverQueryExtension(tqt_xdisplay(), &event_base, &error_base))
{
_idleDetectionPossible = true;
_mit_info = XScreenSaverAllocInfo ();
}
else
{
@ -44,7 +45,6 @@ void IdleTimeDetector::check()
#ifdef HAVE_LIBXSS
if (_idleDetectionPossible)
{
_mit_info = XScreenSaverAllocInfo ();
XScreenSaverQueryInfo(tqt_xdisplay(), tqt_xrootwin(), _mit_info);
int idleSeconds = (_mit_info->idle/1000);
if (idleSeconds >= _maxIdle)

Loading…
Cancel
Save