diff options
author | Keith Packard <keithp@keithp.com> | 2012-08-07 17:49:46 -0700 |
---|---|---|
committer | Jeremy Huddleston Sequoia <jeremyhu@apple.com> | 2012-08-19 08:50:15 -0700 |
commit | 73d62f1aaea4a862cc512048cb6ca59586f4cdb6 (patch) | |
tree | dc2ee850d86c589344ab0b8c91a8bc8085fabe2a | |
parent | 3e62f48edf47a59d923ac58b6d4262b02456a556 (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>
(cherry picked from commit 19772670e3041fe1c7f5bbf32fa039a6d8245ccb)
-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 |