[Mesa-dev] [PATCH] mesa: Close fp on error path.

Ian Romanick idr at freedesktop.org
Tue Jun 28 00:41:40 UTC 2016


It looks like there's another premature return around line 10087.

On 06/27/2016 04:31 PM, Matt Turner wrote:
> ---
>  src/mesa/main/dlist.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c
> index 3845d2e..1cf814b 100644
> --- a/src/mesa/main/dlist.c
> +++ b/src/mesa/main/dlist.c
> @@ -10366,7 +10366,7 @@ print_list(struct gl_context *ctx, GLuint list, const char *fname)
>                 printf
>                    ("ERROR IN DISPLAY LIST: opcode = %d, address = %p\n",
>                     opcode, (void *) n);
> -               return;
> +               goto out;
>              }
>              else {
>                 fprintf(f, "command %d, %u operands\n", opcode,
> @@ -10380,6 +10380,7 @@ print_list(struct gl_context *ctx, GLuint list, const char *fname)
>        }
>     }
>  
> + out:
>     fflush(f);
>     if (fname)
>        fclose(f);
> 



More information about the mesa-dev mailing list