[Mesa-dev] [PATCH 16/40] pipe-loader: teardown the winsys, if create_screen fails
Brian Paul
brianp at vmware.com
Mon Oct 19 09:03:07 PDT 2015
On 10/17/2015 04:57 PM, Emil Velikov wrote:
> i.e. plug some (hard to hit) memory leaks.
>
> Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
> ---
> src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c b/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
> index 0f28541..3ef8c73 100644
> --- a/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
> +++ b/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c
> @@ -237,8 +237,11 @@ static struct pipe_screen *
> 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);
> +
> + return screen;
> }
>
> static struct pipe_loader_ops pipe_loader_sw_ops = {
>
I don't see any tear-down code or memory leak fix as the comments say.
-Brian
More information about the mesa-dev
mailing list