On 21 February 2018 at 15:10, Chuck Atkins <[email protected]> wrote: >> Something doesn't look quite right - it seems that xmesa_init_display >> should be fixed instead. >> >> Currently it returns non-NULL when either of the following fail: >> - driver.create_pipe_screen() >> - CALLOC_STRUCT >> >> I would add an explicit check after those + goto err_path. >> The latter of which doing some proper teardown. Note: that there's a >> leak in there - one should walk, detach & free the new entry from the >> MesaExtInfo list. > > > Rather than deal with the list cleanup after the fact, I can postpone the > list insertion until the end when info is in a known good state. That way > when the error conditions are hit, the only cleanup that needs to be done is > localized to screen and smapi. > That will also work - the DRI based GLX does it already. For details see the __glXInitialize in src/glx/glxext.c.
HTH Emil _______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
