[Mesa-dev] [PATCH] mesa: return early with no error when shader source count is 0

Eric Anholt eric at anholt.net
Thu May 4 20:31:50 UTC 2017


Bartosz Tomczyk <bartosz.tomczyk86 at gmail.com> writes:

> You are right, it doesn't free old shader source.  Should we also clear 
> old source if new source is NULL? Then I could unify both conditions.

shader_source() would free the old and put in the new.  If calloc fails,
you could throw GL_OUT_OF_MEMORY and return.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170504/9007987a/attachment.sig>


More information about the mesa-dev mailing list