mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	sway/config.c: wordexp has a corresponding wordfree which was never used
I had to change the assignment to path to be wrapped by strdup as we pass the data out of the method.
This commit is contained in:
		
							parent
							
								
									c225bcacee
								
							
						
					
					
						commit
						cdf017ceea
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -277,8 +277,9 @@ static char *get_config_path(void) {
 | 
			
		|||
	int i;
 | 
			
		||||
	for (i = 0; i < (int)(sizeof(config_paths) / sizeof(char *)); ++i) {
 | 
			
		||||
		if (wordexp(config_paths[i], &p, 0) == 0) {
 | 
			
		||||
			path = p.we_wordv[0];
 | 
			
		||||
			path = strdup(p.we_wordv[0]);
 | 
			
		||||
			if (file_exists(path)) {
 | 
			
		||||
				wordfree(&p);
 | 
			
		||||
				return path;
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue