mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	mutex: when we fail to fill in mutex into static mutex ptr free it again
This commit is contained in:
		
							parent
							
								
									12065f326a
								
							
						
					
					
						commit
						b304a98854
					
				
					 1 changed files with 2 additions and 0 deletions
				
			
		| 
						 | 
					@ -153,6 +153,8 @@ pa_mutex* pa_static_mutex_get(pa_static_mutex *s, pa_bool_t recursive, pa_bool_t
 | 
				
			||||||
    if ((pa_atomic_ptr_cmpxchg(&s->ptr, NULL, m)))
 | 
					    if ((pa_atomic_ptr_cmpxchg(&s->ptr, NULL, m)))
 | 
				
			||||||
        return m;
 | 
					        return m;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    pa_mutex_free(m);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* Him, filling in failed, so someone else must have filled in
 | 
					    /* Him, filling in failed, so someone else must have filled in
 | 
				
			||||||
     * already */
 | 
					     * already */
 | 
				
			||||||
    pa_assert_se(m = pa_atomic_ptr_load(&s->ptr));
 | 
					    pa_assert_se(m = pa_atomic_ptr_load(&s->ptr));
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue