opencl: fix potential double-free in module globaltonemap