[Mesa-dev] [PATCH] st/dri: use the FREE wrapper for the dri screen
Eric Engestrom
eric.engestrom at intel.com
Thu Aug 30 13:32:21 UTC 2018
On Thursday, 2018-08-30 11:12:11 +0100, Emil Velikov wrote:
> From: Emil Velikov <emil.velikov at collabora.com>
>
> The memory is allocated with the uppercase wrapper. Tear down should
> match that.
You're right, in dri2_init_screen() / dri_kms_init_screen(), but looking
at the history this used to be FREE() and Brian replaced a bunch of them
with free() in fe72a069d1fcce943f315 "mesa: s/FREE/free/".
Cc'ing him to check if going back is the right thing, or if maybe instead
it's the CALLOC() in dri2.c that should be replaced with calloc()?
>
> Cc: mesa-stable at lists.freedesktop.org
> Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
> ---
> src/gallium/state_trackers/dri/dri_screen.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/gallium/state_trackers/dri/dri_screen.c b/src/gallium/state_trackers/dri/dri_screen.c
> index 3e4de59a433..98b02678c81 100644
> --- a/src/gallium/state_trackers/dri/dri_screen.c
> +++ b/src/gallium/state_trackers/dri/dri_screen.c
> @@ -484,7 +484,7 @@ dri_destroy_screen(__DRIscreen * sPriv)
>
> pipe_loader_release(&screen->dev, 1);
>
> - free(screen);
> + FREE(screen);
> sPriv->driverPrivate = NULL;
> sPriv->extensions = NULL;
> }
> --
> 2.18.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list