forked from e16/e16
1
0
Fork 0

Fix snapshot removal memleak.

SVN revision: 13427
This commit is contained in:
Kim Woelders 2005-02-18 18:44:44 +00:00
parent 229346f51d
commit ce7cfc7dcd
1 changed files with 2 additions and 26 deletions

View File

@ -441,33 +441,9 @@ SnapshotEwinUpdate(EWin * ewin, unsigned int flags)
static void
SnapshotEwinRemove(EWin * ewin)
{
Snapshot *sn;
if (ewin->snap)
{
sn = ewin->snap;
SnapshotEwinUnmatch(ewin);
sn = RemoveItem((char *)sn, 0, LIST_FINDBY_POINTER, LIST_TYPE_SNAPSHOT);
}
else
{
char buf[4096];
if (SnapEwinMakeID(ewin, buf, sizeof(buf)))
return;
sn = RemoveItem(buf, 0, LIST_FINDBY_BOTH, LIST_TYPE_SNAPSHOT);
}
if (sn)
{
if (sn->name)
Efree(sn->name);
if (sn->border_name)
Efree(sn->border_name);
if (sn->groups)
Efree(sn->groups);
Efree(sn);
}
SnapshotDestroy(ewin->snap);
ewin->snap = NULL;
}
/*