[Mesa-dev] [PATCH] r600g: Fix memory leak in r600_bytecode_add_vtx.

Alex Deucher alexdeucher at gmail.com
Wed Jan 9 09:17:14 PST 2013


On Wed, Jan 9, 2013 at 2:09 AM, Vinson Lee <vlee at freedesktop.org> wrote:
> Fixes resource leak defect reported by Coverity.
>
> Signed-off-by: Vinson Lee <vlee at freedesktop.org>

Pushed.  thanks!

> ---
>  src/gallium/drivers/r600/r600_asm.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/src/gallium/drivers/r600/r600_asm.c b/src/gallium/drivers/r600/r600_asm.c
> index ef67717..d324d59 100644
> --- a/src/gallium/drivers/r600/r600_asm.c
> +++ b/src/gallium/drivers/r600/r600_asm.c
> @@ -1625,6 +1625,7 @@ int r600_bytecode_add_vtx(struct r600_bytecode *bc, const struct r600_bytecode_v
>                         break;
>                 default:
>                         R600_ERR("Unknown chip class %d.\n", bc->chip_class);
> +                       free(nvtx);
>                         return -EINVAL;
>                 }
>         }
> --
> 1.8.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list