Fix memory leak.

svn path=/trunk/KDE/kdebase/workspace/; revision=804132
This commit is contained in:
Luboš Luňák 2008-05-05 07:22:45 +00:00
parent aa6c0d74da
commit 4851bff561

View file

@ -725,7 +725,7 @@ bool Workspace::keepTransientAbove( const Client* mainwindow, const Client* tran
ToplevelList Workspace::rootStackingOrder() const
{
Window dummy;
Window* windows;
Window* windows = NULL;
unsigned int count = 0;
XQueryTree( display(), rootWindow(), &dummy, &dummy, &windows, &count );
ToplevelList ret;
@ -740,6 +740,8 @@ ToplevelList Workspace::rootStackingOrder() const
}
foreach( Deleted* c, deleted )
ret.append( c );
if( windows != NULL )
XFree( windows );
return ret;
}