From 19772670e3041fe1c7f5bbf32fa039a6d8245ccb Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 7 Aug 2012 17:49:46 -0700 Subject: Only free Render filter names on last screen close 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. Signed-off-by: Keith Packard Reviewed-by: Dave Airlie --- render/filter.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/render/filter.c b/render/filter.c index 8c401ee5d..019ea7f94 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 -- cgit v1.2.3