mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-11-03 09:01:40 -05:00 
			
		
		
		
	Free gamma when property blob creation fails
This commit is contained in:
		
							parent
							
								
									2df97ed16a
								
							
						
					
					
						commit
						b2f6941617
					
				
					 1 changed files with 1 additions and 0 deletions
				
			
		| 
						 | 
					@ -214,6 +214,7 @@ static bool atomic_crtc_set_gamma(struct wlr_drm_backend *drm,
 | 
				
			||||||
	if (drmModeCreatePropertyBlob(drm->fd, gamma,
 | 
						if (drmModeCreatePropertyBlob(drm->fd, gamma,
 | 
				
			||||||
				sizeof(struct drm_color_lut) * size, &crtc->gamma_lut)) {
 | 
									sizeof(struct drm_color_lut) * size, &crtc->gamma_lut)) {
 | 
				
			||||||
		wlr_log_errno(L_ERROR, "Unable to create property blob");
 | 
							wlr_log_errno(L_ERROR, "Unable to create property blob");
 | 
				
			||||||
 | 
							free(gamma);
 | 
				
			||||||
		return false;
 | 
							return false;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue