[Mesa-dev] [PATCH] intel/i965: fix resource leak

Ilia Mirkin imirkin at alum.mit.edu
Sun Sep 25 15:01:54 UTC 2016


On Sun, Sep 25, 2016 at 10:12 AM, Nayan Deshmukh
<nayan26deshmukh at gmail.com> wrote:
> CovID: 1373370
>
> Signed-off-by: Nayan Deshmukh <nayan26deshmukh at gmail.com>
> ---
>  src/intel/tools/disasm.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/src/intel/tools/disasm.c b/src/intel/tools/disasm.c
> index e527615..a747a0a 100644
> --- a/src/intel/tools/disasm.c
> +++ b/src/intel/tools/disasm.c
> @@ -101,8 +101,10 @@ gen_disasm_create(int pciid)
>     if (gd == NULL)
>        return NULL;
>
> -   if (!gen_get_device_info(pciid, &gd->devinfo))
> -      return NULL;
> +   if (!gen_get_device_info(pciid, &gd->devinfo)) {
> +       free(gd);
> +       return NULL;

Indentation is to 3 in this file, not 4.

> +   }
>
>     brw_init_compaction_tables(&gd->devinfo);
>
> --
> 2.7.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list