mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	um: drivers/xterm.c: fix a file descriptor leak
I could use out_close1, but that seems to be the code path to close the fd returned by os_create_unix_socket, and using it to close the fd returned by mkstemp might lead to some confusion, so I don't do it. Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
		
							parent
							
								
									e5f0bdc784
								
							
						
					
					
						commit
						b40997b872
					
				
					 1 changed files with 1 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -123,6 +123,7 @@ static int xterm_open(int input, int output, int primary, void *d,
 | 
			
		|||
		err = -errno;
 | 
			
		||||
		printk(UM_KERN_ERR "xterm_open : unlink failed, errno = %d\n",
 | 
			
		||||
		       errno);
 | 
			
		||||
		close(fd);
 | 
			
		||||
		return err;
 | 
			
		||||
	}
 | 
			
		||||
	close(fd);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue