mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 02:30:34 +02:00 
			
		
		
		
	drm/vc4: Fix memory leak during gpu reset.
__drm_atomic_helper_crtc_destroy_state does not free memory, it only
cleans it up. Fix this by calling the functions own destroy function.
Fixes: 6d6e500391 ("drm/vc4: Allocate the right amount of space for boot-time CRTC state.")
Cc: Eric Anholt <eric@anholt.net>
Cc: <stable@vger.kernel.org> # v4.6+
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190301125627.7285-2-maarten.lankhorst@linux.intel.com
			
			
This commit is contained in:
		
							parent
							
								
									f5a9ed867c
								
							
						
					
					
						commit
						d08106796a
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -1042,7 +1042,7 @@ static void
 | 
			
		|||
vc4_crtc_reset(struct drm_crtc *crtc)
 | 
			
		||||
{
 | 
			
		||||
	if (crtc->state)
 | 
			
		||||
		__drm_atomic_helper_crtc_destroy_state(crtc->state);
 | 
			
		||||
		vc4_crtc_destroy_state(crtc->state);
 | 
			
		||||
 | 
			
		||||
	crtc->state = kzalloc(sizeof(struct vc4_crtc_state), GFP_KERNEL);
 | 
			
		||||
	if (crtc->state)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue