mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	core-util: don't leak memory in pa_unset_env_recorded()
This commit is contained in:
		
							parent
							
								
									1200a0b143
								
							
						
					
					
						commit
						297afadbef
					
				
					 1 changed files with 4 additions and 2 deletions
				
			
		| 
						 | 
					@ -2474,9 +2474,11 @@ void pa_unset_env_recorded(void) {
 | 
				
			||||||
    /* This is not thread-safe */
 | 
					    /* This is not thread-safe */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    for (;;) {
 | 
					    for (;;) {
 | 
				
			||||||
        char *s = NULL;
 | 
					        char *s;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (!(recorded_env = pa_strlist_pop(recorded_env, &s)))
 | 
					        recorded_env = pa_strlist_pop(recorded_env, &s);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if (!s)
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        unsetenv(s);
 | 
					        unsetenv(s);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue