mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	call_find_module() handles dup() failure: raise an OSError exception
This commit is contained in:
		
							parent
							
								
									925ef39949
								
							
						
					
					
						commit
						d417d01ec8
					
				
					 1 changed files with 4 additions and 0 deletions
				
			
		|  | @ -3567,6 +3567,10 @@ call_find_module(PyObject *name, PyObject *path_list) | |||
|         if (fd != -1) | ||||
|             fd = dup(fd); | ||||
|         fclose(fp); | ||||
|         if (fd == -1) { | ||||
|             PyErr_SetFromErrno(PyExc_OSError); | ||||
|             return NULL; | ||||
|         } | ||||
|         fp = NULL; | ||||
|     } | ||||
|     if (fd != -1) { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Victor Stinner
						Victor Stinner