From ed092a8e1f7006a57031299c5429a5952e5602e2 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Mon, 10 Feb 2014 20:03:19 +0000 Subject: [PATCH] pipe-loader: destroy sw_winsys on sw_release 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 Reviewed-by: Jakob Bornecrantz Reviewed-by: Francisco Jerez --- 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); -- 2.7.4