summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2011-10-24 10:01:26 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2012-07-09 10:39:02 +1000
commitc4d28c40bfb7e6ccdb921b610f26a3881bc5974a (patch)
tree0afcf651e3ded377e43f7d0d5fce91e6fdaa030a
parent487e8e829942fcafe2435576d1e4cf831002aed4 (diff)
xfree86: fix use-after-free issue in checkInput
*dev is the condition of the while loop we're in, reset to NULL after freeing Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dave Airlie <airlied@redhat.com> (cherry picked from commit e3f47be9fbc489e3eb5832445924810b2ff300f7)
-rw-r--r--hw/xfree86/common/xf86Config.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index ec679df16..7491f720d 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -2324,6 +2324,7 @@ checkInput(serverLayoutPtr layout, Bool implicit_layout)
current = dev;
free(*dev);
+ *dev = NULL;
do {
*current = *(current + 1);