mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	bluetooth: Free memblock after codec errors
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/628>
This commit is contained in:
		
							parent
							
								
									45df212d66
								
							
						
					
					
						commit
						48f40352a6
					
				
					 1 changed files with 3 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -392,6 +392,8 @@ static int bt_process_render(struct userdata *u) {
 | 
			
		|||
 | 
			
		||||
    if (processed != u->write_memchunk.length) {
 | 
			
		||||
        pa_log_error("Encoding error");
 | 
			
		||||
        pa_memblock_unref(u->write_memchunk.memblock);
 | 
			
		||||
        pa_memchunk_reset(&u->write_memchunk);
 | 
			
		||||
        return -1;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -535,6 +537,7 @@ static int bt_process_push(struct userdata *u) {
 | 
			
		|||
 | 
			
		||||
    if (processed != (size_t) received) {
 | 
			
		||||
        pa_log_error("Decoding error");
 | 
			
		||||
        pa_memblock_unref(memchunk.memblock);
 | 
			
		||||
        return -1;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue