On Tue, Jan 28, 2014 at 11:59:14AM +0000, Emil Velikov wrote:
> Signed-off-by: Emil Velikov <[email protected]>
> ---
> src/egl/drivers/dri2/platform_android.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/src/egl/drivers/dri2/platform_android.c
> b/src/egl/drivers/dri2/platform_android.c
> index 4a201c8..e149a4b 100644
> --- a/src/egl/drivers/dri2/platform_android.c
> +++ b/src/egl/drivers/dri2/platform_android.c
> @@ -722,6 +722,8 @@ cleanup_screen:
> dri2_dpy->core->destroyScreen(dri2_dpy->dri_screen);
> cleanup_driver:
> dlclose(dri2_dpy->driver);
> +cleanup_driver_name:
> + free(dri2_dpy->driver_name);
> cleanup_device:
> close(dri2_dpy->fd);
> cleanup_display:
> --
> 1.8.5.2
The driver name still leaks when this failure is hit:
if (!dri2_load_driver(dpy)) {
err = "DRI2: failed to load driver";
goto cleanup_device;
}
To fix the leak, I think that failure block should goto
cleanup_driver_name.
_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev