mirror of
				https://github.com/postgres/postgres.git
				synced 2025-10-29 00:05:29 -04:00 
			
		
		
		
	Preserve errno across free().
Dept. of second thoughts: free() isn't guaranteed not to change errno. Make sure we report the right error if getcwd() fails.
This commit is contained in:
		
							parent
							
								
									9aca512506
								
							
						
					
					
						commit
						2209c0f861
					
				| @ -608,7 +608,10 @@ make_absolute_path(const char *path) | ||||
| 			} | ||||
| 			else | ||||
| 			{ | ||||
| 				int			save_errno = errno; | ||||
| 
 | ||||
| 				free(buf); | ||||
| 				errno = save_errno; | ||||
| #ifndef FRONTEND | ||||
| 				elog(ERROR, "could not get current working directory: %m"); | ||||
| #else | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user