[Mesa-dev] [PATCH 19/20] mesa/main: Add missing null check in _mesa_CreatePerfQueryINTEL()

Petri Latvala petri.latvala at intel.com
Thu May 15 03:29:15 PDT 2014


Reviewed-by: Petri Latvala <petri.latvala at intel.com>

On 05/14/2014 08:56 PM, Juha-Pekka Heikkila wrote:
> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
> ---
>   src/mesa/main/performance_monitor.c | 5 +++++
>   1 file changed, 5 insertions(+)
>
> diff --git a/src/mesa/main/performance_monitor.c b/src/mesa/main/performance_monitor.c
> index 21b9423..9d1a6b4 100644
> --- a/src/mesa/main/performance_monitor.c
> +++ b/src/mesa/main/performance_monitor.c
> @@ -1036,6 +1036,11 @@ _mesa_CreatePerfQueryINTEL(GLuint queryId, GLuint *queryHandle)
>      }
>   
>      m = new_performance_monitor(ctx, first);
> +   if (m == NULL) {
> +      _mesa_error_no_memory(__func__);
> +      return;
> +   }
> +
>      _mesa_HashInsert(ctx->PerfMonitor.Monitors, first, m);
>      *queryHandle = first;
>   



More information about the mesa-dev mailing list