[PATCH 1/3] Only free Render filter names on last screen close
Dave Airlie
airlied at gmail.com
Sun Aug 12 17:48:53 PDT 2012
On Wed, Aug 8, 2012 at 10:49 AM, Keith Packard <keithp at keithp.com> wrote:
> Hotplugging screens causes the render filter names to get freed while
> still in use; wait for the last core screen to be closed before
> freeing them. That only happens at server reset, when we want them to
> be freed.
Indeed, ugly but effective, maybe in the future we can make some sort
of notifier systems to hook into for global objects to be freed at
certain times,
But otherwise,
Reviewed-by: Dave Airlie <airlied at redhat.com>
>
> Signed-off-by: Keith Packard <keithp at keithp.com>
> ---
> render/filter.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/render/filter.c b/render/filter.c
> index 8c401ee..019ea7f 100644
> --- a/render/filter.c
> +++ b/render/filter.c
> @@ -273,7 +273,10 @@ PictureResetFilters(ScreenPtr pScreen)
>
> free(ps->filters);
> free(ps->filterAliases);
> - PictureFreeFilterIds();
> +
> + /* Free the filters when the last screen is closed */
> + if (pScreen->myNum == 0)
> + PictureFreeFilterIds();
> }
>
> int
> --
> 1.7.10.4
>
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel
More information about the xorg-devel
mailing list