mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	Free wordexp_t in config.c:get_config_path
Thanks @jollywho
This commit is contained in:
		
							parent
							
								
									5af4e747d3
								
							
						
					
					
						commit
						33b24736c7
					
				
					 1 changed files with 2 additions and 0 deletions
				
			
		| 
						 | 
					@ -174,9 +174,11 @@ static char *get_config_path(void) {
 | 
				
			||||||
		if (wordexp(config_paths[i], &p, 0) == 0) {
 | 
							if (wordexp(config_paths[i], &p, 0) == 0) {
 | 
				
			||||||
			path = p.we_wordv[0];
 | 
								path = p.we_wordv[0];
 | 
				
			||||||
			if (file_exists(path)) {
 | 
								if (file_exists(path)) {
 | 
				
			||||||
 | 
									wordfree(&p);
 | 
				
			||||||
				return path;
 | 
									return path;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
							wordfree(&p);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return NULL; // Not reached
 | 
						return NULL; // Not reached
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue