[PATCH xf86-video-ati 4/4] Always call drmModeFreeProperty after drmModeGetProperty

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces at lists.freedesktop.org] On Behalf
> Of Michel Dänzer
> Sent: Friday, October 20, 2017 11:28 AM
> To: amd-gfx at lists.freedesktop.org
> Subject: [PATCH xf86-video-ati 4/4] Always call drmModeFreeProperty after
> drmModeGetProperty
> 
> From: Michel Dänzer <michel.daenzer at amd.com>
> 
> We were not doing so in all cases, leaking memory allocated by the
> latter.
> 
> (Cherry picked from amdgpu commit
> f6b39bcd45cb06976ba8a3600df77fc471c63995)
> 
> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>

Series is:
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  src/drmmode_display.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/drmmode_display.c b/src/drmmode_display.c
> index 369c1efc3..167ecfb43 100644
> --- a/src/drmmode_display.c
> +++ b/src/drmmode_display.c
> @@ -1913,8 +1913,8 @@ drmmode_output_init(ScrnInfoPtr pScrn,
> drmmode_ptr drmmode, drmModeResPtr mode_r
>  				drmModeFreeProperty(props);
>  				break;
>  			}
> -			drmModeFreeProperty(props);
>  		}
> +		drmModeFreeProperty(props);
>  	}
> 
>  	kencoders = calloc(sizeof(drmModeEncoderPtr), koutput-
> >count_encoders);
> @@ -2003,8 +2003,8 @@ drmmode_output_init(ScrnInfoPtr pScrn,
> drmmode_ptr drmmode, drmModeResPtr mode_r
>  				drmModeFreeProperty(props);
>  				break;
>  			}
> -			drmModeFreeProperty(props);
>  		}
> +		drmModeFreeProperty(props);
>  	}
> 
>  	if (dynamic) {
> --
> 2.14.2
> 
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux