mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	bluez5: use reallocarray
This commit is contained in:
		
							parent
							
								
									c0cf2d802b
								
							
						
					
					
						commit
						9e3b784b34
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -1579,7 +1579,7 @@ const struct a2dp_codec **spa_bt_device_get_supported_a2dp_codecs(struct spa_bt_
 | 
			
		|||
		if (j >= size) {
 | 
			
		||||
			const struct a2dp_codec **p;
 | 
			
		||||
			size = size * 2;
 | 
			
		||||
			p = realloc(supported_codecs, size * sizeof(const struct a2dp_codec *));
 | 
			
		||||
			p = reallocarray(supported_codecs, size, sizeof(const struct a2dp_codec *));
 | 
			
		||||
			if (p == NULL) {
 | 
			
		||||
				free(supported_codecs);
 | 
			
		||||
				return NULL;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue