mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	bluetooth: correct possible segmentation fault
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/443>
This commit is contained in:
		
							parent
							
								
									8f6029077a
								
							
						
					
					
						commit
						dd7593b836
					
				
					 1 changed files with 1 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -627,8 +627,6 @@ static DBusMessage *hf_audio_agent_new_connection(DBusConnection *c, DBusMessage
 | 
			
		|||
 | 
			
		||||
    card = pa_hashmap_get(backend->cards, path);
 | 
			
		||||
 | 
			
		||||
    card->connecting = false;
 | 
			
		||||
 | 
			
		||||
    if (!card || codec != HFP_AUDIO_CODEC_CVSD || card->fd >= 0) {
 | 
			
		||||
        pa_log_warn("New audio connection invalid arguments (path=%s fd=%d, codec=%d)", path, fd, codec);
 | 
			
		||||
        pa_assert_se(r = dbus_message_new_error(m, "org.ofono.Error.InvalidArguments", "Invalid arguments in method call"));
 | 
			
		||||
| 
						 | 
				
			
			@ -639,6 +637,7 @@ static DBusMessage *hf_audio_agent_new_connection(DBusConnection *c, DBusMessage
 | 
			
		|||
 | 
			
		||||
    pa_log_debug("New audio connection on card %s (fd=%d, codec=%d)", path, fd, codec);
 | 
			
		||||
 | 
			
		||||
    card->connecting = false;
 | 
			
		||||
    card->fd = fd;
 | 
			
		||||
    card->transport->codec = codec;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue