[Mesa-dev] [PATCH] egl: don't fill client apis string forever.
Dave Airlie
airlied at gmail.com
Wed Mar 18 15:27:22 PDT 2015
On 17 March 2015 at 01:39, Matt Turner <mattst88 at gmail.com> wrote:
> On Sun, Mar 15, 2015 at 10:22 PM, Dave Airlie <airlied at gmail.com> wrote:
>> We never reset the string on eglTerminate, so it grows
>> for ever on multiple eglInitialise.
>>
>> Signed-off-by: Dave Airlie <airlied at redhat.com>
>> ---
>> src/egl/main/eglapi.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c
>> index bd8ffa0..d139038 100644
>> --- a/src/egl/main/eglapi.c
>> +++ b/src/egl/main/eglapi.c
>> @@ -514,6 +514,7 @@ eglTerminate(EGLDisplay dpy)
>>
>> drv->API.Terminate(drv, disp);
>> /* do not reset disp->Driver */
>> + disp->ClientAPIsString[0] = 0;
>
> Don't you need to do the same for dpy->ExtensionsString?
>
Okay I had to convince myself it wasn't needed too, and it
isn't,
the extensions string addition function always restarts at
the start of the buffer, and doesn't use strcat it uses memcpy
and moves the point along each time.
So just this patch is required.
>
> Reviewed-by: Matt Turner <mattst88 at gmail.com>
Thanks,
Dave.
More information about the mesa-dev
mailing list