mirror of
				https://github.com/alsa-project/alsa-lib.git
				synced 2025-11-03 09:01:52 -05:00 
			
		
		
		
	dlmisc: fix snd_plugin_dir locking for not DL_ORIGIN_AVAILABLE
Fixes: 8580c081c2 ("dlsym: add support for ALSA_PLUGIN_DIR environment variable")
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
			
			
This commit is contained in:
		
							parent
							
								
									ad8c8e5503
								
							
						
					
					
						commit
						1d993b37ab
					
				
					 1 changed files with 1 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -46,7 +46,7 @@ static int snd_plugin_dir_set = 0;
 | 
			
		|||
static char *snd_plugin_dir = NULL;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if defined(DL_ORIGIN_AVAILABLE) && defined(HAVE_LIBPTHREAD)
 | 
			
		||||
#ifdef HAVE_LIBPTHREAD
 | 
			
		||||
static pthread_mutex_t snd_dlpath_mutex = PTHREAD_MUTEX_INITIALIZER;
 | 
			
		||||
 | 
			
		||||
static inline void snd_dlpath_lock(void)
 | 
			
		||||
| 
						 | 
				
			
			@ -440,12 +440,10 @@ void snd_dlobj_cache_cleanup(void)
 | 
			
		|||
		free(c);
 | 
			
		||||
	}
 | 
			
		||||
	snd_dlobj_unlock();
 | 
			
		||||
#ifdef DL_ORIGIN_AVAILABLE
 | 
			
		||||
	snd_dlpath_lock();
 | 
			
		||||
	snd_plugin_dir_set = 0;
 | 
			
		||||
	free(snd_plugin_dir);
 | 
			
		||||
	snd_plugin_dir = NULL;
 | 
			
		||||
	snd_dlpath_unlock();
 | 
			
		||||
#endif
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue