Avoid a segfault in shader compilation
Avoid a segfault in shader compilation

If a shader reaches an out-of-memory condition while adding
a new function (reallocating the function list), a segfault
will occur during cleanup (because the num_functions field
is non-zero, but the functions pointer is NULL).

This fixes that segfault by zeroing out the num_functions
field if reallocation fails.

wolf96/glsl-optimizer,bkaradzic/glsl-optimizer,zz85/glsl-optimizer,dellis1972/glsl-optimizer,bkaradzic/glsl-optimizer,mapbox/glsl-optimizer,benaadams/glsl-optimizer,jbarczak/glsl-optimizer,jbarczak/glsl-optimizer,zz85/glsl-optimizer,zeux/glsl-optimizer,mcanthony/glsl-optimizer,jbarczak/glsl-optimizer,benaadams/glsl-optimizer,metora/MesaGLSLCompiler,dellis1972/glsl-optimizer,tokyovigilante/glsl-optimizer,tokyovigilante/glsl-optimizer,djreep81/glsl-optimizer,adobe/glsl2agal,mapbox/glsl-optimizer,adobe/glsl2agal,mapbox/glsl-optimizer,KTXSoftware/glsl2agal,bkaradzic/glsl-optimizer,tokyovigilante/glsl-optimizer,KTXSoftware/glsl2agal,djreep81/glsl-optimizer,zeux/glsl-optimizer,wolf96/glsl-optimizer,adobe/glsl2agal,zz85/glsl-optimizer,zeux/glsl-optimizer,mcanthony/glsl-optimizer,zz85/glsl-optimizer,adobe/glsl2agal,jbarczak/glsl-optimizer,wolf96/glsl-optimizer,KTXSoftware/glsl2agal,dellis1972/glsl-optimizer,zeux/glsl-optimizer,zeux/glsl-optimizer,tokyovigilante/glsl-optimizer,benaadams/glsl-optimizer,bkaradzic/glsl-optimizer,benaadams/glsl-optimizer,tokyovigilante/glsl-optimizer,zz85/glsl-optimizer,jbarczak/glsl-optimizer,dellis1972/glsl-optimizer,dellis1972/glsl-optimizer,mcanthony/glsl-optimizer,benaadams/glsl-optimizer,metora/MesaGLSLCompiler,djreep81/glsl-optimizer,adobe/glsl2agal,djreep81/glsl-optimizer,KTXSoftware/glsl2agal,djreep81/glsl-optimizer,mapbox/glsl-optimizer,mapbox/glsl-optimizer,zz85/glsl-optimizer,KTXSoftware/glsl2agal,benaadams/glsl-optimizer,bkaradzic/glsl-optimizer,mcanthony/glsl-optimizer,wolf96/glsl-optimizer,metora/MesaGLSLCompiler,wolf96/glsl-optimizer,mcanthony/glsl-optimizer