i.e. plug some (hard to hit) memory leaks.
v2: fix rebase fallout - really teardown the winsys (Brian)
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Rob Clark <robclark@freedesktop.org>
pipe_loader_sw_create_screen(struct pipe_loader_device *dev)
{
struct pipe_loader_sw_device *sdev = pipe_loader_sw_device(dev);
+ struct pipe_screen *screen;
- return sdev->dd->create_screen(sdev->ws);
+ screen = sdev->dd->create_screen(sdev->ws);
+ if (!screen)
+ sdev->ws->destroy(sdev->ws);
+
+ return screen;
}
static struct pipe_loader_ops pipe_loader_sw_ops = {