mirror of
				https://github.com/alsa-project/alsa-lib.git
				synced 2025-11-03 09:01:52 -05:00 
			
		
		
		
	Fix missing snd_dlclose() in sequencer
Call snd_dlclose() with the dlopen handle in snd_seq_close().
This commit is contained in:
		
							parent
							
								
									b9c53dd962
								
							
						
					
					
						commit
						9c69158f31
					
				
					 2 changed files with 11 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -915,7 +915,14 @@ static int snd_seq_open_conf(snd_seq_t **seqp, const char *name,
 | 
			
		|||
       _err:
 | 
			
		||||
	if (type_conf)
 | 
			
		||||
		snd_config_delete(type_conf);
 | 
			
		||||
	return err >= 0 ? open_func(seqp, name, seq_root, seq_conf, streams, mode) : err;
 | 
			
		||||
	if (! err) {
 | 
			
		||||
		err = open_func(seqp, name, seq_root, seq_conf, streams, mode);
 | 
			
		||||
		if (err < 0)
 | 
			
		||||
			snd_dlclose(h);
 | 
			
		||||
		else
 | 
			
		||||
			(*seqp)->dl_handle = h;
 | 
			
		||||
	}
 | 
			
		||||
	return err;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static int snd_seq_open_noupdate(snd_seq_t **seqp, snd_config_t *root,
 | 
			
		||||
| 
						 | 
				
			
			@ -1029,6 +1036,8 @@ int snd_seq_close(snd_seq_t *seq)
 | 
			
		|||
	int err;
 | 
			
		||||
	assert(seq);
 | 
			
		||||
	err = seq->ops->close(seq);
 | 
			
		||||
	if (seq->dl_handle)
 | 
			
		||||
		snd_dlclose(seq->dl_handle);
 | 
			
		||||
	free(seq->obuf);
 | 
			
		||||
	free(seq->ibuf);
 | 
			
		||||
	free(seq->tmpbuf);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue