mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-11-03 09:01:40 -05:00 
			
		
		
		
	render/vulkan/pixel_format: do not leak props->...
`vulkan_format_props_query` calls `query_modifier_support` which initializes fields of `props` with allocated memory. this memory is leaked if `query_modifier_support` does not find a supported format and shmtex is not supported, as in this case `add_fmt_props` ends up being false and the allocated fields of `props` are never freed.
This commit is contained in:
		
							parent
							
								
									e7b217efb9
								
							
						
					
					
						commit
						35d1bcff6f
					
				
					 1 changed files with 2 additions and 0 deletions
				
			
		| 
						 | 
					@ -296,6 +296,8 @@ void vulkan_format_props_query(struct wlr_vk_device *dev,
 | 
				
			||||||
	if (add_fmt_props) {
 | 
						if (add_fmt_props) {
 | 
				
			||||||
		dev->format_props[dev->format_prop_count] = props;
 | 
							dev->format_props[dev->format_prop_count] = props;
 | 
				
			||||||
		++dev->format_prop_count;
 | 
							++dev->format_prop_count;
 | 
				
			||||||
 | 
						} else {
 | 
				
			||||||
 | 
							vulkan_format_props_finish(props);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue