diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2011-10-24 10:01:26 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2012-07-04 21:16:16 +1000 |
commit | e3f47be9fbc489e3eb5832445924810b2ff300f7 (patch) | |
tree | c0cba4f77837e4af62c003a0bf1b078dd19cc29c | |
parent | 252a69b592001b34714d0fe7508e1898883f9d01 (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>
-rw-r--r-- | hw/xfree86/common/xf86Config.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c index b22b617a4..3ec40fe9b 100644 --- a/hw/xfree86/common/xf86Config.c +++ b/hw/xfree86/common/xf86Config.c @@ -2329,6 +2329,7 @@ checkInput(serverLayoutPtr layout, Bool implicit_layout) current = dev; free(*dev); + *dev = NULL; do { *current = *(current + 1); |