Thanks Daniel for a detailed explain with link, that was totally my misunderstood. ignore this patch ^^.
2017-07-17 23:20 GMT+09:00 Daniel Stone <dan...@fooishbar.org>: > Hi, > > On 17 July 2017 at 15:02, Gwan-gyeong Mun <elong...@gmail.com> wrote: >> gbm_dri_surface_create() might create gbm_surface without modifiers. >> therefore, gbm_dri_surface_destroy() needs to check modifiers is null or not >> prior to free it. > > This is not true. The code here does not perform a dereference of > surf->base.modifiers (the only dereference occurs on surf). free() > itself is explicitly specified to be safe when passing NULL: > 'If ptr is a null pointer, no action shall occur.' > — http://pubs.opengroup.org/onlinepubs/009695399/functions/free.html > > Cheers, > Daniel -- Gwan-gyeong Mun _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev