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
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to