Mesa (10.2): pipe-loader: Don't destroy the winsys in the sw loader

Ian Romanick idr at kemper.freedesktop.org
Sat May 10 03:27:28 UTC 2014


Module: Mesa
Branch: 10.2
Commit: 03673bcf6c66cbcaece48eecb0766e1e2b77f9fa
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=03673bcf6c66cbcaece48eecb0766e1e2b77f9fa

Author: Tom Stellard <thomas.stellard at amd.com>
Date:   Thu May  8 21:05:02 2014 -0400

pipe-loader: Don't destroy the winsys in the sw loader

The screen takes ownership of the winsys, and is responsible for
destroying it.  Users of pipe-loader should make sure they destory
and  screens they've created to avoid memory leaks.

This fixes a crash in clover introduced by
ce6c17c0833032e91a2d1b34f9eb80c738a854a2 where the pipe-loader was
destroying the winsys while a screen was still using it.

Cc: "10.2" <mesa-stable at lists.freedesktop.org>
Reviewed-by: Emil Velikov <emil.l.velikov at gmail.com>
(cherry picked from commit c650033b863c3ac8388ff1b192b476f63cf81202)

---

 src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c |    3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c b/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
index 08d4353..fa317f2 100644
--- a/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
+++ b/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
@@ -145,9 +145,6 @@ pipe_loader_sw_release(struct pipe_loader_device **dev)
 {
    struct pipe_loader_sw_device *sdev = pipe_loader_sw_device(*dev);
 
-   if (sdev->ws && sdev->ws->destroy)
-      sdev->ws->destroy(sdev->ws);
-
    if (sdev->lib)
       util_dl_close(sdev->lib);
 




More information about the mesa-commit mailing list