Fix some memory leaks
This commit is contained in:
		
							parent
							
								
									28f22b4653
								
							
						
					
					
						commit
						f52b6c944e
					
				
					 3 changed files with 27 additions and 35 deletions
				
			
		|  | @ -289,6 +289,11 @@ string runProgram(Path program, bool searchPath = false, | |||
| 
 | ||||
| MakeError(ExecError, Error) | ||||
| 
 | ||||
| /* Convert a list of strings to a null-terminated vector of char
 | ||||
|    *'s. The result must not be accessed beyond the lifetime of the | ||||
|    list of strings. */ | ||||
| std::vector<const char *> stringsToCharPtrs(const Strings & ss); | ||||
| 
 | ||||
| /* Close all file descriptors except stdin, stdout, stderr, and those
 | ||||
|    listed in the given set.  Good practice in child processes. */ | ||||
| void closeMostFDs(const set<int> & exceptions); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue