mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-03 09:13:20 +03:00 
			
		
		
		
	Fix double frees in ecpg.
Patch by Patrick Krecker <patrick@judicata.com>
This commit is contained in:
		@@ -327,6 +327,7 @@ main(int argc, char *const argv[])
 | 
			
		||||
						fprintf(stderr, _("%s: could not open file \"%s\": %s\n"),
 | 
			
		||||
								progname, output_filename, strerror(errno));
 | 
			
		||||
						free(output_filename);
 | 
			
		||||
						output_filename = NULL;
 | 
			
		||||
						free(input_filename);
 | 
			
		||||
						continue;
 | 
			
		||||
					}
 | 
			
		||||
@@ -474,8 +475,10 @@ main(int argc, char *const argv[])
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			if (output_filename && out_option == 0)
 | 
			
		||||
			if (output_filename && out_option == 0) {
 | 
			
		||||
				free(output_filename);
 | 
			
		||||
				output_filename = NULL;
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			free(input_filename);
 | 
			
		||||
		}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user