diff options
author | Keith Packard <keithp@keithp.com> | 2012-08-07 17:49:46 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2012-08-14 17:12:21 -0700 |
commit | 19772670e3041fe1c7f5bbf32fa039a6d8245ccb (patch) | |
tree | a208bd056f2eea8203caa57f8f6f0d85c371d17e | |
parent | 863d528a9f76d0e8f122aebf19f8564a4c67a938 (diff) |
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 <keithp@keithp.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
-rw-r--r-- | render/filter.c | 5 |
1 files changed, 4 insertions, 1 deletions
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 |