Re: [Mesa-dev] [PATCH] glx/dri: Initialize api even if num_attribs == 0.

2012-01-11 Thread Ian Romanick
On 01/10/2012 11:36 PM, Kenneth Graunke wrote: Both dri2_create_context_attribs and drisw_create_context_attribs call dri2_convert_glx_attribs, expecting it to fill in *api on success. However, when num_attribs == 0, it was returning true without setting *api, causing the caller to use an uninit

Re: [Mesa-dev] [PATCH] glx/dri: Initialize api even if num_attribs == 0.

2012-01-10 Thread Kenneth Graunke
On 01/10/2012 11:47 PM, Vadim Girlin wrote: On Tue, 2012-01-10 at 23:36 -0800, Kenneth Graunke wrote: Both dri2_create_context_attribs and drisw_create_context_attribs call dri2_convert_glx_attribs, expecting it to fill in *api on success. However, when num_attribs == 0, it was returning true w

Re: [Mesa-dev] [PATCH] glx/dri: Initialize api even if num_attribs == 0.

2012-01-10 Thread Vadim Girlin
On Tue, 2012-01-10 at 23:36 -0800, Kenneth Graunke wrote: > Both dri2_create_context_attribs and drisw_create_context_attribs call > dri2_convert_glx_attribs, expecting it to fill in *api on success. > > However, when num_attribs == 0, it was returning true without setting > *api, causing the call

[Mesa-dev] [PATCH] glx/dri: Initialize api even if num_attribs == 0.

2012-01-10 Thread Kenneth Graunke
Both dri2_create_context_attribs and drisw_create_context_attribs call dri2_convert_glx_attribs, expecting it to fill in *api on success. However, when num_attribs == 0, it was returning true without setting *api, causing the caller to use an uninitialized value. Cc: Vadim Girlin Signed-off-by: