[Mesa-dev] [PATCH 03/10] pipe-loader: destroy sw_winsys on sw_release

Emil Velikov emil.l.velikov at gmail.com
Thu Feb 13 08:18:13 PST 2014


The sw pipe-loader implicitly handles winsys_create, thus we
it would make sense to implicitly destroy it upon releasing
the loader.

Currently we leak the sw_winsys when releasing the pipe-loader.

Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob at vmware.com>
Reviewed-by: Francisco Jerez <currojerez at riseup.net>
---
 src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c b/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
index 95a4f84..fd3d989 100644
--- a/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
+++ b/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
@@ -75,6 +75,9 @@ 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);
 
-- 
1.8.5.4



More information about the mesa-dev mailing list