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:
		
							parent
							
								
									252a69b592
								
							
						
					
					
						commit
						e3f47be9fb
					
				| 
						 | 
				
			
			@ -2329,6 +2329,7 @@ checkInput(serverLayoutPtr layout, Bool implicit_layout)
 | 
			
		|||
 | 
			
		||||
                current = dev;
 | 
			
		||||
                free(*dev);
 | 
			
		||||
                *dev = NULL;
 | 
			
		||||
 | 
			
		||||
                do {
 | 
			
		||||
                    *current = *(current + 1);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue