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>
This commit is contained in:
Peter Hutterer 2011-10-24 10:01:26 +10:00
parent 252a69b592
commit e3f47be9fb

View File

@ -2329,6 +2329,7 @@ checkInput(serverLayoutPtr layout, Bool implicit_layout)
current = dev;
free(*dev);
*dev = NULL;
do {
*current = *(current + 1);