summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErkin Bahceci <erkinbah@gmail.com>2009-08-27 12:25:46 -0500
committerErkin Bahceci <erkinbah@gmail.com>2009-08-27 12:25:46 -0500
commitf7f85197598d31b44f614d222049d4d0836b4b46 (patch)
treed38755c5e9243c72d8bac5cb43b3582d1cc8cf07
parent911dd279e05ef0da0d7825e3a4031236be0c06d0 (diff)
downloadwinrules-f7f85197598d31b44f614d222049d4d0836b4b46.tar.gz
winrules-f7f85197598d31b44f614d222049d4d0836b4b46.tar.bz2
Fix invalid read.
-rw-r--r--winrules.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/winrules.c b/winrules.c
index 21ce98a..4348258 100644
--- a/winrules.c
+++ b/winrules.c
@@ -575,7 +575,8 @@ winrulesGetAllowedActionsForWindow (CompWindow *w,
WRAP (ws, w->screen, getAllowedActionsForWindow,
winrulesGetAllowedActionsForWindow);
- *clearActions |= ~ww->allowedActions;
+ if (ww)
+ *clearActions |= ~ww->allowedActions;
}
static void
@@ -763,6 +764,9 @@ winrulesFiniWindow (CompPlugin *p,
compRemoveTimeout (ww->handle);
free (ww);
+
+ WINRULES_SCREEN (w->screen);
+ w->base.privates[ws->windowPrivateIndex].ptr = NULL;
}
static CompBool