GI-800: fixing memory leak.
Merge branch 'GI-800' into gles20-reorg